Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
fengfeng
Yak Posting Veteran
64 Posts |
Posted - 2011-04-27 : 15:59:36
|
| IFNULL(SUM( CASE WHEN gb.date BETWEEN line.start_date AND line.start_date + INTERVAL 6 DAY THEN gb.volume END ),0) AS 'Volume_First_7',I have the following query and instead of between line.start_date and line.start_date +interval 6 day, I want gb.date between min(gb.date) and min(gb.date) + interval 6 daybut I want Group by errors. I want that instead because there could be volume before the line.start_date so instead I want to use whatever is the first date that posted volume using the gb.date field. |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
|
|
|
|
|