Spira Registered User. Local time Today, 10:35 Joined Feb 23, 2004 Messages 35 Mar 4, 2004 #1 hi, im making a computer repair system and would like to know how to extract the most frequent customer ID (integer) using a query. thanks
hi, im making a computer repair system and would like to know how to extract the most frequent customer ID (integer) using a query. thanks
P Pat Hartman Super Moderator Staff member Local time Today, 05:35 Joined Feb 19, 2002 Messages 45,303 Mar 4, 2004 #2 SELECT TOP 1 UserID, Count(*) AS CallCount FROM tblRepair GROUP BY UserID ORDER BY Count(*) DESC;
Spira Registered User. Local time Today, 10:35 Joined Feb 23, 2004 Messages 35 Mar 4, 2004 #3 Pat Hartman said: SELECT TOP 1 UserID, Count(*) AS CallCount FROM tblRepair GROUP BY UserID ORDER BY Count(*) DESC; Click to expand... where do i put this? is there any way of putting this in a QBE? ( i only know how to use this) thanks
Pat Hartman said: SELECT TOP 1 UserID, Count(*) AS CallCount FROM tblRepair GROUP BY UserID ORDER BY Count(*) DESC; Click to expand... where do i put this? is there any way of putting this in a QBE? ( i only know how to use this) thanks
P Pat Hartman Super Moderator Staff member Local time Today, 05:35 Joined Feb 19, 2002 Messages 45,303 Mar 4, 2004 #4 Switch to SQL view. Change UserID to your field name (both places) Change tblRepair to your table name Once you have changed the two names, you can switch to QBE view if you prefer.
Switch to SQL view. Change UserID to your field name (both places) Change tblRepair to your table name Once you have changed the two names, you can switch to QBE view if you prefer.
Spira Registered User. Local time Today, 10:35 Joined Feb 23, 2004 Messages 35 Mar 6, 2004 #5 Pat Hartman said: Switch to SQL view. Change UserID to your field name (both places) Change tblRepair to your table name Once you have changed the two names, you can switch to QBE view if you prefer. Click to expand... thanks for your help, it now works!!
Pat Hartman said: Switch to SQL view. Change UserID to your field name (both places) Change tblRepair to your table name Once you have changed the two names, you can switch to QBE view if you prefer. Click to expand... thanks for your help, it now works!!