Lexsi DataAgent — datasets
Collection
Trajectories, eval logs and SFT data for the Lexsi DataAgent (Track 3). • 2 items • Updated
Error code: DatasetGenerationError
Exception: CastError
Message: Couldn't cast
base_model: string
base_accuracy: double
lora_accuracy: double
n_tasks: int64
base: list<item: struct<id: string, question: string, generated_sql: string, correct: bool, detail: string (... 26 chars omitted)
child 0, item: struct<id: string, question: string, generated_sql: string, correct: bool, detail: string, raw_gener (... 14 chars omitted)
child 0, id: string
child 1, question: string
child 2, generated_sql: string
child 3, correct: bool
child 4, detail: string
child 5, raw_generation: string
lora: list<item: struct<id: string, question: string, generated_sql: string, correct: bool, detail: string (... 26 chars omitted)
child 0, item: struct<id: string, question: string, generated_sql: string, correct: bool, detail: string, raw_gener (... 14 chars omitted)
child 0, id: string
child 1, question: string
child 2, generated_sql: string
child 3, correct: bool
child 4, detail: string
child 5, raw_generation: string
sql: string
pattern: string
question: string
verified_by_execution: bool
completion: string
source: string
prompt: string
to
{'prompt': Value('string'), 'completion': Value('string'), 'question': Value('string'), 'sql': Value('string'), 'pattern': Value('string'), 'source': Value('string'), 'verified_by_execution': Value('bool')}
because column names don't match
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1835, in _prepare_split_single
for key, table in generator:
^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 621, in wrapped
for item in generator(*args, **kwargs):
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 361, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2381, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2309, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
base_model: string
base_accuracy: double
lora_accuracy: double
n_tasks: int64
base: list<item: struct<id: string, question: string, generated_sql: string, correct: bool, detail: string (... 26 chars omitted)
child 0, item: struct<id: string, question: string, generated_sql: string, correct: bool, detail: string, raw_gener (... 14 chars omitted)
child 0, id: string
child 1, question: string
child 2, generated_sql: string
child 3, correct: bool
child 4, detail: string
child 5, raw_generation: string
lora: list<item: struct<id: string, question: string, generated_sql: string, correct: bool, detail: string (... 26 chars omitted)
child 0, item: struct<id: string, question: string, generated_sql: string, correct: bool, detail: string, raw_gener (... 14 chars omitted)
child 0, id: string
child 1, question: string
child 2, generated_sql: string
child 3, correct: bool
child 4, detail: string
child 5, raw_generation: string
sql: string
pattern: string
question: string
verified_by_execution: bool
completion: string
source: string
prompt: string
to
{'prompt': Value('string'), 'completion': Value('string'), 'question': Value('string'), 'sql': Value('string'), 'pattern': Value('string'), 'source': Value('string'), 'verified_by_execution': Value('bool')}
because column names don't match
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1379, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 956, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1702, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1887, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
prompt string | completion string | question string | sql string | pattern string | source string | verified_by_execution bool |
|---|---|---|---|---|---|---|
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: What is the revenue between 2026-10-05 and 2026-10-06 for delivered orders?
SQL: | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-05' AND '2026-10-06' | What is the revenue between 2026-10-05 and 2026-10-06 for delivered orders? | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-05' AND '2026-10-06' | revenue_in_range | expanded-date-range | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: What is the revenue between 2026-10-05 and 2026-10-10 for delivered orders?
SQL: | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-05' AND '2026-10-10' | What is the revenue between 2026-10-05 and 2026-10-10 for delivered orders? | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-05' AND '2026-10-10' | revenue_in_range | expanded-date-range | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: What is the revenue between 2026-10-05 and 2026-10-13 for delivered orders?
SQL: | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-05' AND '2026-10-13' | What is the revenue between 2026-10-05 and 2026-10-13 for delivered orders? | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-05' AND '2026-10-13' | revenue_in_range | expanded-date-range | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: What is the revenue between 2026-10-06 and 2026-10-08 for delivered orders?
SQL: | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-06' AND '2026-10-08' | What is the revenue between 2026-10-06 and 2026-10-08 for delivered orders? | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-06' AND '2026-10-08' | revenue_in_range | expanded-date-range | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: What is the revenue between 2026-10-06 and 2026-10-11 for delivered orders?
SQL: | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-06' AND '2026-10-11' | What is the revenue between 2026-10-06 and 2026-10-11 for delivered orders? | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-06' AND '2026-10-11' | revenue_in_range | expanded-date-range | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: What is the revenue between 2026-10-06 and 2026-10-14 for delivered orders?
SQL: | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-06' AND '2026-10-14' | What is the revenue between 2026-10-06 and 2026-10-14 for delivered orders? | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-06' AND '2026-10-14' | revenue_in_range | expanded-date-range | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: What is the revenue between 2026-10-07 and 2026-10-10 for delivered orders?
SQL: | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-07' AND '2026-10-10' | What is the revenue between 2026-10-07 and 2026-10-10 for delivered orders? | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-07' AND '2026-10-10' | revenue_in_range | expanded-date-range | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: What is the revenue between 2026-10-07 and 2026-10-13 for delivered orders?
SQL: | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-07' AND '2026-10-13' | What is the revenue between 2026-10-07 and 2026-10-13 for delivered orders? | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-07' AND '2026-10-13' | revenue_in_range | expanded-date-range | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: What is the revenue between 2026-10-08 and 2026-10-10 for delivered orders?
SQL: | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-08' AND '2026-10-10' | What is the revenue between 2026-10-08 and 2026-10-10 for delivered orders? | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-08' AND '2026-10-10' | revenue_in_range | expanded-date-range | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: What is the revenue between 2026-10-08 and 2026-10-13 for delivered orders?
SQL: | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-08' AND '2026-10-13' | What is the revenue between 2026-10-08 and 2026-10-13 for delivered orders? | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-08' AND '2026-10-13' | revenue_in_range | expanded-date-range | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: What is the revenue between 2026-10-09 and 2026-10-11 for delivered orders?
SQL: | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-09' AND '2026-10-11' | What is the revenue between 2026-10-09 and 2026-10-11 for delivered orders? | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-09' AND '2026-10-11' | revenue_in_range | expanded-date-range | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: What is the revenue between 2026-10-09 and 2026-10-14 for delivered orders?
SQL: | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-09' AND '2026-10-14' | What is the revenue between 2026-10-09 and 2026-10-14 for delivered orders? | SELECT SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' AND o.order_date BETWEEN '2026-10-09' AND '2026-10-14' | revenue_in_range | expanded-date-range | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: List orders for Sara Malik.
SQL: | SELECT o.id, p.name AS product, o.quantity, o.order_date, o.status FROM orders o JOIN products p ON p.id = o.product_id JOIN customers c ON c.id = o.customer_id WHERE c.name = 'Sara Malik' | List orders for Sara Malik. | SELECT o.id, p.name AS product, o.quantity, o.order_date, o.status FROM orders o JOIN products p ON p.id = o.product_id JOIN customers c ON c.id = o.customer_id WHERE c.name = 'Sara Malik' | orders_for_customer | expanded-customer | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: List orders for Omar Farooq.
SQL: | SELECT o.id, p.name AS product, o.quantity, o.order_date, o.status FROM orders o JOIN products p ON p.id = o.product_id JOIN customers c ON c.id = o.customer_id WHERE c.name = 'Omar Farooq' | List orders for Omar Farooq. | SELECT o.id, p.name AS product, o.quantity, o.order_date, o.status FROM orders o JOIN products p ON p.id = o.product_id JOIN customers c ON c.id = o.customer_id WHERE c.name = 'Omar Farooq' | orders_for_customer | expanded-customer | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: List orders for Hina Raza.
SQL: | SELECT o.id, p.name AS product, o.quantity, o.order_date, o.status FROM orders o JOIN products p ON p.id = o.product_id JOIN customers c ON c.id = o.customer_id WHERE c.name = 'Hina Raza' | List orders for Hina Raza. | SELECT o.id, p.name AS product, o.quantity, o.order_date, o.status FROM orders o JOIN products p ON p.id = o.product_id JOIN customers c ON c.id = o.customer_id WHERE c.name = 'Hina Raza' | orders_for_customer | expanded-customer | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: Show delivered revenue grouped by product.
SQL: | SELECT p.name AS product, SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' GROUP BY p.name ORDER BY revenue DESC | Show delivered revenue grouped by product. | SELECT p.name AS product, SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' GROUP BY p.name ORDER BY revenue DESC | revenue_by_product | paraphrase | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: How much revenue did each product bring in from delivered orders?
SQL: | SELECT p.name AS product, SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' GROUP BY p.name ORDER BY revenue DESC | How much revenue did each product bring in from delivered orders? | SELECT p.name AS product, SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' GROUP BY p.name ORDER BY revenue DESC | revenue_by_product | paraphrase | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: Break down delivered revenue by product.
SQL: | SELECT p.name AS product, SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' GROUP BY p.name ORDER BY revenue DESC | Break down delivered revenue by product. | SELECT p.name AS product, SUM(o.quantity * p.unit_price) AS revenue FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' GROUP BY p.name ORDER BY revenue DESC | revenue_by_product | paraphrase | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: Which customer spent the most on delivered orders?
SQL: | SELECT c.name AS customer, SUM(o.quantity * p.unit_price) AS total FROM orders o JOIN customers c ON c.id = o.customer_id JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' GROUP BY c.name ORDER BY total DESC LIMIT 1 | Which customer spent the most on delivered orders? | SELECT c.name AS customer, SUM(o.quantity * p.unit_price) AS total FROM orders o JOIN customers c ON c.id = o.customer_id JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' GROUP BY c.name ORDER BY total DESC LIMIT 1 | top_customer | paraphrase | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: Who is our biggest customer by delivered revenue?
SQL: | SELECT c.name AS customer, SUM(o.quantity * p.unit_price) AS total FROM orders o JOIN customers c ON c.id = o.customer_id JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' GROUP BY c.name ORDER BY total DESC LIMIT 1 | Who is our biggest customer by delivered revenue? | SELECT c.name AS customer, SUM(o.quantity * p.unit_price) AS total FROM orders o JOIN customers c ON c.id = o.customer_id JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' GROUP BY c.name ORDER BY total DESC LIMIT 1 | top_customer | paraphrase | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: Name the customer with the highest delivered spend.
SQL: | SELECT c.name AS customer, SUM(o.quantity * p.unit_price) AS total FROM orders o JOIN customers c ON c.id = o.customer_id JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' GROUP BY c.name ORDER BY total DESC LIMIT 1 | Name the customer with the highest delivered spend. | SELECT c.name AS customer, SUM(o.quantity * p.unit_price) AS total FROM orders o JOIN customers c ON c.id = o.customer_id JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' GROUP BY c.name ORDER BY total DESC LIMIT 1 | top_customer | paraphrase | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: What is the mean value of a delivered order?
SQL: | SELECT AVG(o.quantity * p.unit_price) AS avg_value FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' | What is the mean value of a delivered order? | SELECT AVG(o.quantity * p.unit_price) AS avg_value FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' | avg_order_value | paraphrase | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: On average, how much is a delivered order worth?
SQL: | SELECT AVG(o.quantity * p.unit_price) AS avg_value FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' | On average, how much is a delivered order worth? | SELECT AVG(o.quantity * p.unit_price) AS avg_value FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' | avg_order_value | paraphrase | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: Compute the average delivered order value.
SQL: | SELECT AVG(o.quantity * p.unit_price) AS avg_value FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' | Compute the average delivered order value. | SELECT AVG(o.quantity * p.unit_price) AS avg_value FROM orders o JOIN products p ON p.id = o.product_id WHERE o.status = 'delivered' | avg_order_value | paraphrase | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: How many pending orders are there?
SQL: | SELECT COUNT(*) AS n FROM orders WHERE status = 'pending' | How many pending orders are there? | SELECT COUNT(*) AS n FROM orders WHERE status = 'pending' | count_by_status | paraphrase | true |
Write a read-only SQL query for the question below using this schema.
Schema:
customers(id, name, city, segment)
products(id, name, category, unit_price)
orders(id, customer_id, product_id, quantity, order_date, status)
Question: Count the delivered orders.
SQL: | SELECT COUNT(*) AS n FROM orders WHERE status = 'delivered' | Count the delivered orders. | SELECT COUNT(*) AS n FROM orders WHERE status = 'delivered' | count_by_status | paraphrase | true |
No dataset card yet