{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

mis cheat sheet

mis cheat sheet - 1)List the names of all courses their...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1)List the names of all courses, their departments, and the number of credits for each? SELECT course_name, department, num_credits FROM courses; 2) List the names, hometowns, and home states of all students. SELECT student_name, city, state FROM students 3) List all values in the COURSES table. SELECT *FROM courses 4) List all values in the TEACHERS table. SELECT * FROM teachers 5) List the course name, department, and number of credits for all three-credit courses. SELECT course_name, department, num_credits FROM courses WHERE num_credits=3 6) List the names and salaries of teachers earning more than $30,000.00. SELECT teacher_name, salary FROM teachers WHERE salary > 30000 7) Who are all the male students? SELECT student_name FROM studentsWHERE sex= “m” 8) List the names and addresses of all female students from Chicago. SELECT student_name, address, city, state, zip FROM students WHERE sex = “f” AND city=”Chicago” 9) Which math courses have 3 or more credits? SELECT course_name, department, num_credits FROM courses WHERE department= “Math” AND num_credits >=3 10) List the name, sex, city, and state for all students who are either from Connecticut, or from a city called Erie. SELECT student_name, sex, city, state FROM studentsWHERE state= “CT” OR City= “Erie” 11) List the names, cities, states, and zip codes of all students whose zip codes are between 20000 and 29999 or who live in a city called Erie SELECT student_name, city, state, zip FROM students WHERE (zip >= “20000” AND zip <=“29999”) OR city= “Erie” 12) List the names and states of all students who are not from Illinois. SELECT student_name, state FROM studentsWHERE NOT (state= “IL”) 13) List the names and salaries of teachers who make between $30,000 and $35,000 a year SELECT teacher_name, salary FROM teachers WHERE salary BETWEEN 30000 AND 35000 14) List the names, cities, states, and zip codes of students whose zip codes are not between 20000 and 29999 SELECT student_name, city, state, zip FROM students WHERE zip NOT BETWEEN “20000” AND “29999” 15) List the name and sex of every student whose name begins with “Jo” SELECT student_name, sex FROM students WHERE student_name LIKE “Jo*” 16)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}