![]() |
| |||||||
| Sponsored Links |
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| Hi, I have this query i am trying to find out how many students registered having a student no. If the student has a student no he will enter it in the status field if he doesnt has a student no the field will be blank I have this query but the count it gives me is not right can someone tell me whats wrong with it Code: strdist="SELECT DISTINCT Registration.Country, COUNT(Registration.Country) AS [count]FROM Registration INNER JOIN Registration_Tracking ON Registration.Email = Registration_Tracking.Email WHERE Registration_Tracking.Status Is Not Null and (Registration_Tracking.Type = 'Arts')GROUP BY Registration.Country order by Country" todd |
| Sponsored Links |
|
#2
| ||||
| ||||
| If using SQL Server you can do the following: SQL COUNT DISTINCT Function
__________________ jmurrayhead If you agree with me... click the icon! If my post solved your problem, click the button in the lower right-hand corner of the post.Join our Folding team: DeveloperBarn Folding |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| count and distinct problem | todd2006 | SQL Development | 18 | August 1st, 2008 09:20 AM |