tilausj:sql
This is an old revision of the document!
SQL-lauseita
Tilauksia per tuote per vuosi
select name, count(name) as 'ordercount' from orderproducts where DATEPART(yyyy, received) = '2014' group by name order by 'ordercount' desc; select name, DATEPART(yyyy, received) as 'year', count(name) as 'ordercount' from orderproducts group by name, DATEPART(yyyy, received) order by year desc, 'ordercount' desc
tilausj/sql.1526298516.txt.gz · Last modified: 2018-05-14 11:48 by krister