sql - Count result date when they are equals -


i ned date not repeated like:

    date           quantity     2017-06-20     9     2017-08-18     88     2017-06-21     30 

so tried:

select convert(date, updateddate) 'date', count(*) 'flights quanttity' flightschedules group updateddate 

but like:

date           quantity 2017-08-08     1 2017-06-20     1 2017-08-18     88 2017-06-20     16 2017-06-20     8 

because date have hours show dates repeated, convert output transformation, counting hours of day separated, ned count flights day hour on quantity.

thanks help.

use

group convert(date, updateddate) 

instead of :

group updateddate 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -