Jump to content

Whats Wrong With This Sql ?


madsovenielsen
 Share

Recommended Posts

What kind of an error does it give? Is "entry" of type DATETIME (I'm guessing "yes", but am asking anyways)? Is "amount" another column in the "stat80" table?For that last two ones, if yes, then I think the query should be:

SELECT COUNT(DISTINCT remote_addr), amount FROM stat80 WHERE entry < '01-01-2010 00:00'

(note the apostrophes around the date and the comma that separates the two result set columns)

Link to comment
Share on other sites

What kind of an error does it give? Is "entry" of type DATETIME (I'm guessing "yes", but am asking anyways)? Is "amount" another column in the "stat80" table?For that last two ones, if yes, then I think the query should be:
SELECT COUNT(DISTINCT remote_addr), amount FROM stat80 WHERE entry < '01-01-2010 00:00'

(note the apostrophes around the date and the comma that separates the two result set columns)

Yes and yesit works now, thanks
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...