গাইড লিঙ্ক ক্যুইজ · মাঝারি স্তর

কিভাবে এআই কুইজ দিয়ে এসকিউএল কোয়েরি লিখবেন

আপনি একটি AI-কে আপনার স্কিমা কতটা ভালোভাবে দিতে পারেন তা পরীক্ষা করুন, জয়েন ফ্যান-আউট এবং NULL ফাঁদ পেতে পারেন, এবং ফলাফলগুলি বিশ্বাস করার আগে নিরাপদে AI-জেনারেটেড SQL যাচাই করুন৷

প্রশ্ন 1 এর 8

According to the guide, what single step most improves the accuracy of AI-generated SQL?

প্রতিটি প্রশ্নের পূর্বরূপ দেখুন8 প্রশ্ন

আপনি কুইজ নেওয়ার সাথে সাথে উত্তর এবং ব্যাখ্যাগুলি উপস্থিত হয়।

  1. According to the guide, what single step most improves the accuracy of AI-generated SQL?
    • Asking the model to be extra careful
    • Pasting your schema, such as CREATE TABLE statements and relationships
    • Writing your question entirely in uppercase
    • Always using the newest model available
  2. Why should you tell the AI which SQL dialect you are using?
    • Only PostgreSQL supports SELECT statements
    • AI models refuse to answer without a dialect
    • The dialect determines how much disk space a query uses
    • Dialects differ in details like date functions and LIMIT versus TOP
  3. You join orders to order_items and then compute SUM(orders.total). What is the likely problem?
    • Revenue is inflated because each order total repeats once per item
    • The query will always fail with a syntax error
    • NULL values are converted to zero
    • The results come back sorted in the wrong order
  4. Why does the guide recommend asking the AI to explain its query in plain words?
    • It makes the query run faster
    • SQL engines require an explanation before executing
    • It exposes misunderstandings, such as counting rows instead of distinct customers
    • It reduces the cost of the AI request
  5. Which statement about COUNT(column) and COUNT(*) is correct?
    • They always return the same number
    • COUNT(column) skips NULLs, while COUNT(*) counts every row
    • COUNT(*) skips NULLs, while COUNT(column) counts every row
    • COUNT(column) counts only distinct values
  6. What is the safest way to experiment with AI-generated queries?
    • Run them directly on production during quiet hours
    • Ask the AI whether the query is safe and trust the answer
    • Use a read-only database user and wrap data changes in a transaction you can roll back
    • Remove the WHERE clause so the query is simpler
  7. When asking an AI to optimize a slow query, what should you provide besides the query?
    • A screenshot of the dashboard that uses it
    • The database password
    • A list of everyone who runs the report
    • The execution plan from EXPLAIN or EXPLAIN ANALYZE
  8. Which of these is a misconception the guide warns against?
    • A query that runs without errors must be returning the right answer
    • The schema alone is often enough context, without real customer data
    • An UPDATE without a WHERE clause affects every row
    • Business rules like amounts stored in cents should be stated