-
March 20th, 2012, 05:43 PM
#1
Get date of last appearance of value on table
I didnt know how to title this thread...
I have a table with name,a number and a date.
I need to get the date in wich, that number changed from zero from end to start.
For example:
I have
name 1, 8, date1
name 1, 0, date2
name 1, 3, date3
name 1, 8, date4
name 1, 0, date5
name 1, 0, date6
from the last date to start the last day with "0" is date5, so I need to get that value or date4 and then I add 1 day.
Any idea of how can I do this?
Thanks
-
March 21st, 2012, 09:28 PM
#2
Re: Get date of last appearance of value on table
Don't answer this, im an idiot. After a long day making complex querys I couldnt resolve a simple:
Select name,max(date)
from table
where number<>0
group by name;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|