task NULL handling · easy
Predict: unknown prices in a filter
Predict the products returned by a filter for list prices other than 1.25.
what to return
- Columns
stock_codelist_pricein this order- Rows
- any order
- Watch for
- Use only the sample rows shown. NULL is not zero or empty text. Keep duplicate rows.
- Skill
- Reason about the exact result of a fixed SQL query. Refresher: Understand NULL →
data you can query
Retail dataset: the first 6 rows of each table. Under each column name: the kind of value it holds, and which table it links to. Your queries run on all rows.
price_sample2 columns · 5 rows
| stock_codetext | list_pricedecimal |
|---|---|
| A | 1.25 |
| B | 2.5 |
| C | NULL |
| D | 1.25 |
| E | NULL |
- stock_codetext
- A
- list_pricedecimal
- 1.25
- stock_codetext
- B
- list_pricedecimal
- 2.5
- stock_codetext
- C
- list_pricedecimal
- NULL
- stock_codetext
- D
- list_pricedecimal
- 1.25
- stock_codetext
- E
- list_pricedecimal
- NULL
all 5 rows
SELECT stock_code, list_price FROM price_sample WHERE list_price <> 1.25
SELECT stock_code, list_price FROM price_sample WHERE list_price <> 1.25
Look at the sample tables and SQL. Enter the rows you think the query returns, in this column order: stock_code, list_price. Put each row in square brackets, then wrap all rows in another pair of brackets (JSON format). For example, [[1,null]] is one row with 2 values. Replace these with your predicted values. Use numbers without quotes, text in double quotes, and null for SQL NULL. Keep repeated rows. Use [] for no rows. Rows can be in any order.
Hints and the answer are always available. Using them counts the question as solved with help.