# 3.9.3 Assignment

course: Academy — 65-GENAI-for-Engineers
module: Academy/65-GENAI-for-Engineers
type: pdf
source_url: https://personal-learn.armco.dev/files/Academy/65-GENAI-for-Engineers/assignments/3.9.3_Assignment__INNER_vs_LEFT_JOIN/3.9.3_Assignment.pdf
pages: 1

---
[page 1]
Practice Assignment: Compare INNER and LEFT JOIN 
 Tables to Create 
 Table A:  students 
 roll_no  name 
 1  Riya 
 2  Ayaan 
 3  Priya 
 4  Kunal 
 Table B:  submissions 
 roll_no  status 
 1  Submitted 
 2  Submitted 
 Practice Tasks 
 Q1.  Write an  INNER JOIN  query to show only students  who submitted the assignment. 
 Q2.  Write a  LEFT JOIN  query to show all students and  their submission status. 
 Q3.  Modify the  LEFT JOIN  query to show only students  who  did not submit  (status is NULL). 
 Q4.  Use both  INNER JOIN  and  LEFT JOIN  to return two  tables: 
 ●  One with only matched students 
 ●  One with all students (matched and unmatched) 
 Compare the number of rows returned in both queries. 
 Q5.  Real-World Case: 
 Create  products(product_id, product_name)  and  sales(product_id,  quantity) 
 tables. 
 Write a LEFT JOIN query to find all products and their sales quantity (NULL if not sold).