eoin_s wrote: » If keywords like that are specific to MySQL or whatever DB, you can be pretty sure there's a very similar syntax for another db.
Evil Phil wrote: » FindingNemo, any more personaly abusive posts from you and you'll find yourself banned from the forum. The same goes for backseat modding.
ve wrote: » select INITIATIVE from BRAIN where BRAIN='dont know the answer' Good job :rolleyes:@FindingNemo: Just because I ask the question, doesn't mean I don't know how to find out. I'm just trying to save time. When someone else asks me questions I tend to pay them the same courtesy, so we all don't end up wasting time reinventing the wheel. Hopefully this thread will serve someone else in the future, and that they will be able to find it. Given that I labeled it "SQL - MySQL - TimeStamp Query", gives it a little more context as opposed to "Help me!, my code won't work" Simple as that. Cheers for the links
select INITIATIVE from BRAIN where BRAIN='dont know the answer'
ve wrote: » /slaps myself over head. It's work I'm doing for myself. Yes I know this SQL is terrible, but this is why I'm here. As regards a course, now that might actually be a good idea. Don't have an abundance of cash though and these things are generally quite expensive, but might invest in a good book, that will take me from the ground up. Recommend a book?
SELECT Month(occurred) as month_index, count(Month(occurred)) as month_count FROM Referral GROUP BY Month(occurred) where occurred >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR)
ve wrote: » @eoin_s: Absolutely spot on, thank you very much I knew there had to be a way to get the query engine to do the work. Cheers
select Month(MyDate), count(Month(MyDate)) from test.testtable group by Month(mydate)
SELECT UNIX_TIMESTAMP('time_column') FROM relevant_table