SQL basic query learning prompt
An editable learning prompt that explains basic SQL queries based on the user’s level, with sample tables and practice exercises.
An editable learning prompt that explains basic SQL queries based on the user’s level, with sample tables and practice exercises.
Models
Use panel
0/6 filled
You are a data tutor who explains basic SQL query logic to learners in a simple, clear, and example-based way. Using the details below, create an editable SQL basics learning session suitable for the user’s level. SQL level: Query topic to learn: Learning goal: Sample table context: SQL environment: Practice depth: Rules: - Work in a general and educational SQL learning context. - Focus first on basic SELECT queries for reading and learning. - Keep sample table and column names small, clear, and anonymous. - Mark any missing table names, column names, or data structure as assumptions. - Add a review note that SQL syntax may have small differences depending on the selected environment. - Prepare the output as a learning draft the user can adapt to their own table structure. Output format: 1. Short learning goal summary 2. Sample table structure 3. Simple explanation of the query topic 4. Basic SQL concepts 5. Step-by-step query logic 6. 6 sample SQL queries 7. Short explanation of what each query does 8. Mini practice tasks 9. Notes for adapting to the user’s own table 10. Common points of confusion 11. Short review plan 12. Final checklist
This section helps you understand when and how to use this prompt more clearly.
This prompt helps users learn basic SQL queries such as SELECT, WHERE, ORDER BY, GROUP BY, and JOIN in a structured way. It can create sample table structures, query explanations, mini exercises, and a checklist.
It is useful for SQL beginners, users learning data analysis basics, people who want to write report queries, learners who want to read table structures, and anyone who wants to practice SQL through examples.
Use it when learning a SQL topic for the first time, understanding query logic through a sample table, creating query drafts for your own table, or reviewing with short practice tasks.
A user may want to list products in a sales table, filter by category, or group sales amounts. This prompt can create sample table structures, basic queries, and explanations based on the user’s level.
Instead of entering only the SQL topic, include the sample table context. For example, writing I want to filter a sales table by category creates a clearer learning draft than writing only WHERE.
Can this prompt explain SELECT queries step by step?
Yes. It can explain SELECT, WHERE, ORDER BY, and basic filtering with a simple sample table.
Can this prompt be used to learn JOIN?
Yes. If the user chooses JOIN, it can explain relationship logic and basic query structure with two sample tables.
This example shows how the prompt can create a SQL basics learning session with a table structure, sample queries, and practice tasks.
The goal of this session is to use a sample table named sales to list data, filter rows by conditions, and sort the results.
Table name: sales Columns: id: sale record number sale_date: sale date product_name: product name category: product category quantity: quantity sold unit_price: unit price
SELECT defines which columns we want to see from a table. WHERE filters rows based on a condition. ORDER BY sorts the results by a selected column.
1. SELECT * FROM sales; This query lists all columns and rows from the sales table. 2. SELECT product_name, quantity, unit_price FROM sales; This query shows only the product name, quantity, and unit price columns. 3. SELECT * FROM sales WHERE category = 'Notebook'; This query lists rows where the category value is Notebook. 4. SELECT * FROM sales WHERE quantity > 5; This query shows sales where the quantity is greater than 5. 5. SELECT product_name, unit_price FROM sales ORDER BY unit_price DESC; This query sorts products from highest to lowest unit price.
This example is an editable draft for learning basic SQL queries. Table names, column names, and query syntax should be reviewed based on the user’s own working environment.
Writing the query topic clearly helps keep the explanation focused.
Adding a sample table context makes the SQL examples closer to real use.
Mentioning the SQL environment helps explain syntax differences more accurately.
Before using examples, compare the sample table and column names with your own structure.
Yes. If the level is set to beginner or basic, it can explain topics such as SELECT, WHERE, and ORDER BY with simple examples.
Yes. If you provide the table context, column names, and learning goal, it can create more relevant query drafts.
Yes. If the SQL environment is provided, explanations and notes can be adjusted accordingly.
No. It can also prepare query logic, sample table structures, explanations, mini practice tasks, adaptation notes, and a checklist.
Prompts are for illustration only. Accuracy isn't guaranteed—please read and adapt them for your situation.
This prompt is for general purposes. For legal, medical or financial decisions please consult a qualified professional.
1. Write a query that lists only product_name and category. 2. Filter rows where quantity is 10 or higher. 3. Sort results by sale_date from newest to oldest. 4. List products from a selected category. 5. Create a cleaner query by selecting only the columns you need.
The names sales, product_name, and category are examples. If your database uses different table or column names, replace these fields based on your own structure. SQL syntax can have small differences depending on the selected environment, so queries should be reviewed before use.
Is the table name correct? Do the column names match your own table? Does the WHERE condition select the expected rows? Is ORDER BY sorting by the correct column? Did you select only the columns you need? Is the query compatible with your SQL environment?