extract(hour from loan_time), count(*), sum(cents_loaned/100),
sum(count(*)) over (order by extract(hour from loan_time)),
sum(sum(cents_loaned/100)) over (order by extract(hour from loan_time)),
where loan_time::date = '2012-10-01'
group by extract(hour from loan_time)
order by extract(hour from loan_time)
- Moved by Kalman TothEditor Sunday, December 08, 2013 3:30 PM Not db design
Yep, looks like MySQL, please post on appropriate forum.
Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting: Large scale of database and data cleansing
Remote DBA Services: Improves MS SQL Database Performance
SQL Server Integration Services: Business Intelligence