Thanks, but that doesn't work either... -----Oprindelig meddelelse----- Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]P� vegne af Norman J. Nolasco Sendt: 11. april 2002 23:18 Til: [EMAIL PROTECTED] Emne: RE: [IMail Forum] OT: SQL syntax!
I'm not exactly sure if this is what you're looking for, but will this get the result you need? SELECT WEEK, COUNT(DISTINCT IP) AS UNIQUEIPCOUNT FROM tblVisitor GROUP BY WEEK -Norm -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Thomas Testmann Sent: Thursday, April 11, 2002 3:18 PM To: [EMAIL PROTECTED] Subject: [IMail Forum] OT: SQL syntax! Hi, I have a counter on my website, which stores in a table, named 'Visitors', with the following fields: [Section],[Page],[Browser],[Country],[Date],[Time],[Year],[Month],[Week],[Da y],[Referent],[IP] I would then like to make a query on how many unique IPs there is, listed by week. However, I don't know how to do it, besides making two queries, 'IP1' and 'IP2', where it is the last mentioned that shows it. 'IP2', however makes a query on 'IP1', and I'd like to get a more "clean" query, that is, directly on the table. The two queries look like this: IP1: SELECT Visitors.Week, Visitors.IP FROM Visitors GROUP BY Visitors.Week, Visitors.IP; IP2: SELECT [IP1].[Week], Count([IP1].[IP]) AS DifferentIPs FROM IP1 GROUP BY [IP1].[Week]; I believe I should use some join or union, but can't get it to work... Really hope that somebody can help here! Thanks in advance! Regards, Thomas Testmann Please visit http://www.ipswitch.com/support/mailing-lists.html to be removed from this list. An Archive of this list is available at: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/ Please visit the Knowledge Base for answers to frequently asked questions: http://www.ipswitch.com/support/IMail/ Please visit http://www.ipswitch.com/support/mailing-lists.html to be removed from this list. An Archive of this list is available at: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/ Please visit the Knowledge Base for answers to frequently asked questions: http://www.ipswitch.com/support/IMail/ Please visit http://www.ipswitch.com/support/mailing-lists.html to be removed from this list. An Archive of this list is available at: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/ Please visit the Knowledge Base for answers to frequently asked questions: http://www.ipswitch.com/support/IMail/
