i have a database filled with data i entered. now i am gettingstuck with the SEL
ID: 3614231 • Letter: I
Question
i have a database filled with data i entered. now i am gettingstuck with the SELECT operationthe question is asking me to list the firstname, lastname, andphonenumber of users who have entered 3 or more tickets.
i have a USERS table with firstname, lastname, idnumber,phonenumber
and then TICKETS table with ticketnumber, idnumber, description,category
what do i have to do to get it to list those who have more than 3tickets.
i know i have to do something with comparing the idnumber of USERSand TICKETS and probably use COUNT > 3 somehow but i just can'tfigure it out. if you know it ill rate lifesaver, thanks.
Explanation / Answer
SELECT USERS.firstname, USERS.lastname, USERS.phonenumber FROM USERS, TICKETS WHERE (USERS.idnumber = TICKETS.idnumber) AND(COUNT(TICKETS.ticketnumber) >3)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.