Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6999663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:34:16+00:00 2026-05-27T20:34:16+00:00

(SELECT s.sid, s.sname, e.ccode FROM student s INNER JOIN enrolled e ON s.sid =

  • 0
(SELECT s.sid, s.sname, e.ccode
FROM student s INNER JOIN enrolled e 
ON s.sid = e.sid
WHERE s.programme = 'IT')
WHERE EXISTS
(SELECT c.ccode, c.tid
FROM class c INNER JOIN tutor t
ON c.tid = t.tid
WHERE t.tname = 'Hoffman');

This is what i’ve got so far, doesn’t work though. Need to get the names of IT students from the student table that are enrolled in a class by a tutor named Hoffman, all from the enrolled, class and tutor tables.
where am i going wrong?

Class:

ccode   | cname         | weekday | meets at | room  | tid
________________________________________________________________________
CIS166  | Intro to Comp | Tue     | 10:00:00 | MB300 | 1
________________________________________________________________________
CIS177  | Maths         | Mon     | 15:00:00 | MB100 | 6
________________________________________________________________________
CIS188  | Info Syst     | Thu     | 14:00:00 | MB230 | 5
________________________________________________________________________
CIS199  | Intro to Java | Fri     | 10:00:00 | MB300 | 4
________________________________________________________________________
CIS277  | Algorithmics  | Thu     | 14:00:00 | MB200 | 2
________________________________________________________________________
CIS288  | Database Syst | Mon     | 14:00:00 | MB142 | 1
________________________________________________________________________
CIS297  | Web Design    | Mon     | 16:00:00 | MB109 | 3
________________________________________________________________________
CIS298  | C++           | Fri     | 10:00:00 | MB110 | 8

Tutor:

tid | tname
_____________________
1   | Rob Hoffman
_____________________
2   | James Butler
_____________________
3   | Kathy Bond
_____________________
4   | Theodora Stewart
_____________________
5   | Mike Richie
_____________________
6   | John Kay
_____________________
7   | Mary Tregear
_____________________
8   | Mark Robinson

Enrolled:

sid | ccode
______________
211 | CIS288
203 | CIS298
214 | CIS297
105 | CIS177
215 | CIS297
104 | CIS188
210 | CIS297
338 | CIS320
102 | CIS177
338 | CIS399
204 | CIS288
204 | CIS277
102 | CIS199
203 | CIS297
105 | CIS199
331 | CIS320
202 | CIS299
205 | CIS299
210 | CIS298
331 | CIS399
321 | CIS399
210 | CIS288
210 | CIS277
204 | CIS297
321 | CIS320
328 | CIS388
327 | CIS388
211 | CIS297
333 | CIS399
215 | CIS288
104 | CIS199

Student:

sid | sname        | programme | level | age
____________________________________________
101 | Lorry Ross   | CS         | 1     | 18
102 | Lydia Ken    | CIS        | 1     | 18
103 | Bob Chung    | CS         | 1     | 18
104 | Sonia Morris | CIS        | 1     | 18
105 | Mark Poppy   | CS         | 1     | 19
106 | Megan Chi    | IT         | 1     | 20
218 | Diana McDon  | IT         | 2     | 20
219 | Nick Smith   | IT         | 2     | 21
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:34:17+00:00Added an answer on May 27, 2026 at 8:34 pm

    Without seeing your schema, this is a guess, but should point you in the right direction:

    select s.sid, s.sname, e.ccode 
    from student s
    inner join enrolled e on s.sid = e.sid 
    inner join class c on e.ccode = c.ccode --may be incorrect
    inner join tutor t on c.tid = t.tid 
    where s.programme = 'IT'
        and t.tname = 'Hoffman'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

SELECT s.sid, s.sname, COUNT(s.age) AS age FROM student s INNER JOIN enrolled e ON
I have a following HQL query: SELECT s.id FROM stack s WHERE s.category is
select distinct constraint_type from user_constraints; C - C P R U Seems P means
select max(DELIVERY_TIMESTAMP) from DOCUMENTS; will return the time that the latest document was delivered.
SELECT `name` , COUNT(*) AS `count` FROM `t1`, `t2` WHERE `t2`.`id` = `t1`.`id` GROUP
SELECT avg(con_hits) as avg_hits FROM content WHERE con_type = 1 AND con_posttime < $twelve_hrs_ago
SELECT NR_DZIALU, COUNT (NR_DZIALU) AS LICZ_PRAC_DZIALU FROM PRACOWNICY GROUP BY NR_DZIALU HAVING NR_DZIALU =
I have this query: SELECT p.text,se.name,s.sub_name,SUM((p.volume / (SELECT SUM(p.volume) FROM phrase p WHERE p.volume
So I have a query where I select from the 'sites' table, and count
I am using MySQL. Here is my schema: Suppliers( sid: integer , sname: string,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.