Jump to content

dotnet

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dotnet's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hey everyone, I\'m having trouble using the having clause... here\'s my situation: I have a table of users, and the date they joined... I want data of the users who signed up in the last 7 days before the last user signup... so my sql statement looks something like this: SELECT * from userlist HAVING created_date <= max(created_date) and created_date >= (max(created_date) - (7 * 24 * 60 * 60)) it either returns everything in the table, or nothing... have be head over heels... thanks for your help...
  2. thank you very much...
  3. hey folks, I\'m having trouble with SQL, I have two tables, one is called GROUPS and the other is called MEMBERS GROUPS has a groupid field, and the rest are details about the group. MEMBERS has a groupid and a memberid field... the groupid in the MEMBERS table shows which group the member is with I want to count how many members there are in a group SELECT g.groupid, count(m.groupid) member# FROM groups g, members m WHERE g.groupid = m.groupid GROUP BY m.groupid this works fine, the only problem is that it doesn\'t show groups with zero members... I want all the groups whether they have members or not to show up... thanks for your help
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.