Sir I have this data

Untitledg_jygukg.png

Group by hours

Or

First value of every hour

Please help

Recommended Answers

select min(`Date`), `Qty` from `tablename` group by extract(hour from `Date`);
Jump to Post

All 2 Replies

select min(`Date`), `Qty` from `tablename` group by extract(hour from `Date`);

Sorry on MS SQL server use datepart instead of extract

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.