# 4.1 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/4.1_Assignment__Foundations_of_Logic_for_Query_Building/4.1_Assignment.pdf
pages: 1

---
[page 1]
4.1 Assignment Questions 
 Short Answer / Conceptual Questions 
 1.  Explain the difference between  AND  ,  OR  , and  NOT  in  SQL with simple examples. 
 2.  Why are parentheses important when combining multiple logical conditions in a WHERE 
 clause? 
 3.  What is the significance of  NULL  in logical operations  and how should it be handled? 
 Hands-On / Practical Tasks 
 4.  Write a SQL query to retrieve employees from a table  Employees  who: 
 ○  Work in the "Sales" department 
 ○  Have either a salary above 50000  or  more than 5 years  of experience 
 ○  Use parentheses appropriately 
 5.  Given a table  Students(Name, Age, Grade)  , write SQL  queries to: 
 a. Select all students older than 18 AND with grade 'A' 
 b. Select all students who are either below 18 OR have grade 'C' 
 c. Exclude students whose age is less than 16 
 6.  Create a truth table manually or in a spreadsheet that shows the outcomes of different 
 combinations of  A  and  B  using  AND  ,  OR  , and  NOT A  .