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 -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -