NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

--@E:Database218417139Week8week8.txt
/*
Name:Sudip Bagale
ID:18417139
week:9
*/


--checking subject_areas and courses;
DESC subject_areas;
DESC courses;


--quering to join subject_areas and courses
SELECT sa.subject_id,sa.subject_name,course_id
FROM subject_areas sa
JOIN courses c
ON sa.subject_id = c.subject_id;


--quering with out using join clause
SELECT s.subject_id,s.subject_name,c.course_id,c.title
FROM subject_areas s,courses c;

--checking courses INSTRUCTORS and offering;
DESC courses;
DESC instructors;
DESC offerings;

--quering to see courses including their title, and the instructors by name who have taught them
SELECT i.instructor_id,i.instructor_name,o.offering_id,c.title,c.course_id
FROM instructors i
JOIN offerings o
ON i.instructor_id=o.instructor_id
JOIN courses c
ON c.course_id=o.course_id
ORDER BY instructor_id;


--including cost of courses
SELECT i.instructor_id,i.instructor_name,o.offering_id,c.title,c.cost
FROM instructors i
JOIN offerings o
ON i.instructor_id=o.instructor_id
JOIN courses c
ON c.course_id=o.course_id
ORDER BY c.cost;

COLUMN cost FORMAT 9999.99
COLUMN title FORMAT A15


--checking students and ATTENDANCE
DESC students;
DESC ATTENDANCE;
--quering to view the students attendance
--right join
SELECT s.student_id,s.student_firstname,s.student_surname,a.evaluation
FROM students s RIGHT JOIN attendance a
ON s.student_id = a.student_id;

--quering to view the students attendance
--left join
SELECT s.student_id,s.student_firstname,s.student_surname,a.evaluation
FROM attendance a LEFT JOIN students s
ON s.student_id = a.student_id;


--checking All courses, offerings and sites, and their relationship to each other
DESC courses;
DESC offerings;
DESC sites;

SELECT c.course_id,c.title,o.offering_id,s.site_id,s.location
FROM courses c
FULL JOIN offerings o
ON c.course_id=o.course_id
FULL JOIN sites s
ON s.site_id=o.site_id;

--checking table subject_areas,courses and sites
SELECT s.site_id,s.location,sa.subject_name,o.offering_id,c.title
FROM subject_areas sa JOIN courses c
ON c.subject_id =sa.subject_id
JOIN offerings o
ON c.course_id=o.course_id
RIGHT JOIN sites s
ON s.site_id = o.site_id;
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.