SQL Quiz: DISTINCT

This SQL quiz is about SELECT DISTINCT and COUNT(DISTINCT ...). You will see how duplicates are judged across whole rows, how NULL and letter case behave, and where DISTINCT is allowed in a query.

आसान 10 सवाल ~5 मिनट पास होने के लिए 80% SQLite

मोड चुनें

आप गेस्ट के तौर पर खेल रहे हैं: XP और streak सेव रखने के लिए साइन इन करें।

सैंपल सवाल

सवाल 1 / 10

What does this query return?

CREATE TABLE orders (customer TEXT, city TEXT);
INSERT INTO orders VALUES ('Ana', 'Paris'), ('Ben', 'Rome'), ('Ana', 'Paris'), ('Cy', 'Paris'), ('Ben', 'Lyon');
SELECT DISTINCT customer FROM orders ORDER BY customer;
जवाब दिखाएं

B. Ana Ben Cy DISTINCT keeps one copy of each different row. Ana and Ben appear twice in the table but once in the result.

इस क्विज़ में क्या है

  • Removing duplicate rows with SELECT DISTINCT
  • DISTINCT applies to the whole row, not one column
  • Counting unique values with COUNT(DISTINCT column)
  • How NULL and letter case affect duplicates
  • DISTINCT vs GROUP BY

अक्सर पूछे जाने वाले सवाल

क्या अकाउंट ज़रूरी है?

नहीं। कोई भी खेल सकता है। XP, streak, badge और हिस्ट्री सेव रखने के लिए साइन इन करें।

क्या मैं इसे दोबारा दे सकता हूं?

हां। आपका बेस्ट स्कोर सेव रहता है, और हर बार सवाल और जवाब शफ़ल होते हैं।