Ravindra BagaleCourses & study guides Track your progress

4. WHERE: फक्त हवे ते रो ठेवा

4.6 सराव: शहर आणि रकमेनुसार ऑर्डर्स फिल्टर करा

का (Why). छोटा filter सराव interview WHERE प्रश्नांसाठी तयार करतो.

काय (What). raja_coffee वर comparisons, IN आणि LIKE एकत्र.

कसं (How). आधी व्यवसाय प्रश्न, मग WHERE, मग SELECT.

पायऱ्या

  1. 300 INR पेक्षा जास्त नाशिक ऑर्डर्स.
  2. पुणे किंवा कोल्हापूर customers.
  3. note असलेले ऑर्डर्स — NULL पुढील chapter.

उदाहरणे

उदाहरण 1 · dataset: raja_coffee

SELECT order_id, city, amount_inr
FROM orders
WHERE city = 'Nashik' AND amount_inr > 300;

Output

order_idcityamount_inr
1007Nashik1080.0
1014Nashik350.0
1022Nashik890.0

Meaning. नाशिक filter सराव.

Ravindra Bagale's Tip

Read the result aloud: “These rows are ___ because ___.”