Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 478 new columns ({'2-15123149-2', '1-15652027-1', '2-15740666-6', '2-1636806-2', '2-13012165-2', '2-11772511-8', '1-11734041-2', '2-16832887-1', '1-17265535-6', '2-16198456-2', '2-16215078-1', '2-15715109-1', '2-14323142-16', '1-1449169-1', '2-18566436-1', '2-16079809-1', '2-14176339-3', '2-1750185-2', '2-17206737-3', '2-18951015-2', '2-1054502-1', '1-1682026-2', '2-14176339-2', 'course_teach', '2-1198472-1', '1-10733530-3', '1-20549371-3', 'student_transcripts_tracking', '2-14177667-3', '1-224672-2', '2-15525566-1', '2-15097334-5', '2-15715109-12', '2-18814912-4', '1-1449176-1', 'european_football_2', '1-1341604-11', '1-16381914-1', '1-11602885-1', '2-18802185-4', '2-12005739-2', '1-1342370-39', '1-1342233-5', '2-11241317-2', '2-18942405-11', 'california_schools', '1-254776-1', '2-17440650-2', '2-18395166-2', '1-22962745-12', '1-16729063-1', '1-13762472-4', '2-16792781-1', '2-18624773-3', '1-157826-1', '2-10721054-4', '2-14423756-3', '1-12547903-3', '2-15322952-2', '1-2523809-1', '1-14345690-4', '2-10538989-2', '2-17357560-1', '2-10581768-2', '1-28730873-2', '2-17304621-5', '1-16275828-4', '2-10780927-1', '1-1708050-1', '2-1543845-2', '2-11786147-5', '2-13071896-2', '1-24565004-15', '2-10882501-8', '1-2308381-2', '1-19753079-35', '1-10798421-1', '1-22496344-1', '2-16234974-1', '2-17577144-2', '1-2231241-1', '1-14342367-13', '2-18259953-4', '1-13833770-3', '1-16796625-1', '2-14415326-2', '2-10560886-3', '2-10600564-2', '2-10648431-3', 'superhero', '2-1780045-1', '2-1126723-3', '2-14010415-1',
...
17239112-7', '1-1342359-39', '2-12791809-1', '1-2840500-6', '1-1714685-1', '2-13986492-14', '1-1342359-5', '2-15715109-40', '1-14946657-3', '2-10777895-2', '1-2562572-11', '1-21907770-4', '1-1342249-5', 'student_club', '1-1211545-2', 'flight_2', '2-18632367-4', '1-2679061-6', '1-1014206-2', '2-17029703-3', '2-11565999-3', '1-2387790-2', '2-14509824-5', '2-1364210-1', '2-13554889-6', '2-16275828-7', '1-13677808-1', '1-1963459-2', 'debit_card_specializing', '1-14342592-8', 'thrombosis_prediction', '2-14687922-2', '1-225102-4', '2-17371250-13', '2-16271198-1', '2-14302613-17', '2-156618-3', '1-1341672-14', '2-14639905-3', '2-1137707-2', '2-15503252-3', '1-10712301-5', '1-140297-1', '2-14027795-2', '1-1342218-17', '2-17093870-5', '2-10325248-2', '2-11099297-12', '2-163231-4', '2-1014206-2', '1-28885977-1', '1-224837-4', '1-1506950-4', '2-11803648-12', '1-1341453-15', '2-14305653-31', '2-15362194-1', '2-11771022-3', '1-2076463-2', '2-1473124-1', '1-18183850-12', '2-13910113-4', '1-12094609-1', '2-15550233-3', '2-17034845-3', '2-18073616-2', '2-17524651-3', '1-11677691-1', '2-16785053-2', '2-12592245-1', '2-17387421-1', '2-18965848-4', 'financial', '1-1473672-8', '2-16250642-1', '2-13909437-6', '2-1028380-5', '1-1220125-4', '1-2668416-7', '2-10122032-1', '1-11609814-1', '1-1857216-1', '2-16772687-18', '2-1055707-1', '1-1341604-10', '2-11763491-1', '2-18579281-5', '2-18807607-2', '1-29202276-2', '1-1206583-2', '1-10601843-2', '1-20925393-3', '1-20823568-2', 'singer', '2-18982988-2'}) and 7 missing columns ({'schema_text_with_content', 'ori_query', 'question', 'evidence', 'db_id', 'schema_text_wo_content', 'amb_query'}).

This happened while the json dataset builder was generating data using

hf://datasets/griffith-bigdata/ambival/dbschema_test.json (at revision 352cc953aeef3d7c49ab2706e49dfbde0b792eb9)

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1831, in _prepare_split_single
                  writer.write_table(table)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 644, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2272, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2218, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              car_1: struct<continents: list<item: string>, countries: list<item: string>, car_makers: list<item: string>, model_list: list<item: string>, car_names: list<item: string>, cars_data: list<item: string>>
                child 0, continents: list<item: string>
                    child 0, item: string
                child 1, countries: list<item: string>
                    child 0, item: string
                child 2, car_makers: list<item: string>
                    child 0, item: string
                child 3, model_list: list<item: string>
                    child 0, item: string
                child 4, car_names: list<item: string>
                    child 0, item: string
                child 5, cars_data: list<item: string>
                    child 0, item: string
              2-18868206-3: struct<2-18868206-3: list<item: string>>
                child 0, 2-18868206-3: list<item: string>
                    child 0, item: string
              2-17077948-1: struct<2-17077948-1: list<item: string>>
                child 0, 2-17077948-1: list<item: string>
                    child 0, item: string
              1-14850099-18: struct<1-14850099-18: list<item: string>>
                child 0, 1-14850099-18: list<item: string>
                    child 0, item: string
              1-1963459-2: struct<1-1963459-2: list<item: string>>
                child 0, 1-1963459-2: list<item: string>
                    child 0, item: string
              flight_2: struct<airlines: list<item: string>, airports: list<item: string>, flights: list<item: string>>
                child 0, airlines: list<item: string>
                    child 0, item: string
                child 1, airports: list<item: string>
                    child 0, item: string
                child 2, flights: list<item: string>
                    child 0, item: string
              cre_Doc_Template_Mgt: struct<ref_template_types: list<item: str
              ...
              t<2-15313481-14: list<item: string>>
                child 0, 2-15313481-14: list<item: string>
                    child 0, item: string
              2-1332289-1: struct<2-1332289-1: list<item: string>>
                child 0, 2-1332289-1: list<item: string>
                    child 0, item: string
              1-12078626-1: struct<1-12078626-1: list<item: string>>
                child 0, 1-12078626-1: list<item: string>
                    child 0, item: string
              1-17822401-1: struct<1-17822401-1: list<item: string>>
                child 0, 1-17822401-1: list<item: string>
                    child 0, item: string
              1-22357065-1: struct<1-22357065-1: list<item: string>>
                child 0, 1-22357065-1: list<item: string>
                    child 0, item: string
              1-24302700-2: struct<1-24302700-2: list<item: string>>
                child 0, 1-24302700-2: list<item: string>
                    child 0, item: string
              1-2679061-6: struct<1-2679061-6: list<item: string>>
                child 0, 1-2679061-6: list<item: string>
                    child 0, item: string
              1-29483673-1: struct<1-29483673-1: list<item: string>>
                child 0, 1-29483673-1: list<item: string>
                    child 0, item: string
              2-13555999-1: struct<2-13555999-1: list<item: string>>
                child 0, 2-13555999-1: list<item: string>
                    child 0, item: string
              2-16181798-1: struct<2-16181798-1: list<item: string>>
                child 0, 2-16181798-1: list<item: string>
                    child 0, item: string
              2-16250642-1: struct<2-16250642-1: list<item: string>>
                child 0, 2-16250642-1: list<item: string>
                    child 0, item: string
              2-17577144-2: struct<2-17577144-2: list<item: string>>
                child 0, 2-17577144-2: list<item: string>
                    child 0, item: string
              to
              {'db_id': Value('string'), 'question': Value('string'), 'evidence': Value('string'), 'schema_text_wo_content': Value('string'), 'schema_text_with_content': Value('string'), 'ori_query': Value('string'), 'amb_query': Value('string')}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1451, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 994, in stream_convert_to_parquet
                  builder._prepare_split(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1702, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1833, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 478 new columns ({'2-15123149-2', '1-15652027-1', '2-15740666-6', '2-1636806-2', '2-13012165-2', '2-11772511-8', '1-11734041-2', '2-16832887-1', '1-17265535-6', '2-16198456-2', '2-16215078-1', '2-15715109-1', '2-14323142-16', '1-1449169-1', '2-18566436-1', '2-16079809-1', '2-14176339-3', '2-1750185-2', '2-17206737-3', '2-18951015-2', '2-1054502-1', '1-1682026-2', '2-14176339-2', 'course_teach', '2-1198472-1', '1-10733530-3', '1-20549371-3', 'student_transcripts_tracking', '2-14177667-3', '1-224672-2', '2-15525566-1', '2-15097334-5', '2-15715109-12', '2-18814912-4', '1-1449176-1', 'european_football_2', '1-1341604-11', '1-16381914-1', '1-11602885-1', '2-18802185-4', '2-12005739-2', '1-1342370-39', '1-1342233-5', '2-11241317-2', '2-18942405-11', 'california_schools', '1-254776-1', '2-17440650-2', '2-18395166-2', '1-22962745-12', '1-16729063-1', '1-13762472-4', '2-16792781-1', '2-18624773-3', '1-157826-1', '2-10721054-4', '2-14423756-3', '1-12547903-3', '2-15322952-2', '1-2523809-1', '1-14345690-4', '2-10538989-2', '2-17357560-1', '2-10581768-2', '1-28730873-2', '2-17304621-5', '1-16275828-4', '2-10780927-1', '1-1708050-1', '2-1543845-2', '2-11786147-5', '2-13071896-2', '1-24565004-15', '2-10882501-8', '1-2308381-2', '1-19753079-35', '1-10798421-1', '1-22496344-1', '2-16234974-1', '2-17577144-2', '1-2231241-1', '1-14342367-13', '2-18259953-4', '1-13833770-3', '1-16796625-1', '2-14415326-2', '2-10560886-3', '2-10600564-2', '2-10648431-3', 'superhero', '2-1780045-1', '2-1126723-3', '2-14010415-1',
              ...
              17239112-7', '1-1342359-39', '2-12791809-1', '1-2840500-6', '1-1714685-1', '2-13986492-14', '1-1342359-5', '2-15715109-40', '1-14946657-3', '2-10777895-2', '1-2562572-11', '1-21907770-4', '1-1342249-5', 'student_club', '1-1211545-2', 'flight_2', '2-18632367-4', '1-2679061-6', '1-1014206-2', '2-17029703-3', '2-11565999-3', '1-2387790-2', '2-14509824-5', '2-1364210-1', '2-13554889-6', '2-16275828-7', '1-13677808-1', '1-1963459-2', 'debit_card_specializing', '1-14342592-8', 'thrombosis_prediction', '2-14687922-2', '1-225102-4', '2-17371250-13', '2-16271198-1', '2-14302613-17', '2-156618-3', '1-1341672-14', '2-14639905-3', '2-1137707-2', '2-15503252-3', '1-10712301-5', '1-140297-1', '2-14027795-2', '1-1342218-17', '2-17093870-5', '2-10325248-2', '2-11099297-12', '2-163231-4', '2-1014206-2', '1-28885977-1', '1-224837-4', '1-1506950-4', '2-11803648-12', '1-1341453-15', '2-14305653-31', '2-15362194-1', '2-11771022-3', '1-2076463-2', '2-1473124-1', '1-18183850-12', '2-13910113-4', '1-12094609-1', '2-15550233-3', '2-17034845-3', '2-18073616-2', '2-17524651-3', '1-11677691-1', '2-16785053-2', '2-12592245-1', '2-17387421-1', '2-18965848-4', 'financial', '1-1473672-8', '2-16250642-1', '2-13909437-6', '2-1028380-5', '1-1220125-4', '1-2668416-7', '2-10122032-1', '1-11609814-1', '1-1857216-1', '2-16772687-18', '2-1055707-1', '1-1341604-10', '2-11763491-1', '2-18579281-5', '2-18807607-2', '1-29202276-2', '1-1206583-2', '1-10601843-2', '1-20925393-3', '1-20823568-2', 'singer', '2-18982988-2'}) and 7 missing columns ({'schema_text_with_content', 'ori_query', 'question', 'evidence', 'db_id', 'schema_text_wo_content', 'amb_query'}).
              
              This happened while the json dataset builder was generating data using
              
              hf://datasets/griffith-bigdata/ambival/dbschema_test.json (at revision 352cc953aeef3d7c49ab2706e49dfbde0b792eb9)
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

db_id
string
question
string
evidence
string
schema_text_wo_content
string
schema_text_with_content
string
ori_query
string
amb_query
string
department_management
What are the names of the heads who are born outside the California state?
Table department, columns = [`department_id` (department id), `name` (name), `creation` (creation), `ranking` (ranking), `budget_in_billions` (budget in billions), `num_employees` (num employees)] Table head, columns = [`head_id` (head id), `name` (name), `born_state` (born state), `age` (age)] Table management, colum...
Table department, columns = [`department_id` (department id. Example values: [1, 2, 3]), `name` (name. Example values: [State, Treasury, Defense]), `creation` (creation. Example values: [1789, 1947, 1870]), `ranking` (ranking. Example values: [1, 2, 3]), `budget_in_billions` (budget in billions. Example values: [9.96,...
SELECT name FROM head WHERE born_state != 'California'
SELECT name FROM head WHERE NOT born_state IN ('California', 'Golden State')
department_management
What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'?
Table department, columns = [`department_id` (department id), `name` (name), `creation` (creation), `ranking` (ranking), `budget_in_billions` (budget in billions), `num_employees` (num employees)] Table head, columns = [`head_id` (head id), `name` (name), `born_state` (born state), `age` (age)] Table management, colum...
Table department, columns = [`department_id` (department id. Example values: [1, 2, 3]), `name` (name. Example values: [State, Treasury, Defense]), `creation` (creation. Example values: [1789, 1947, 1870]), `ranking` (ranking. Example values: [1, 2, 3]), `budget_in_billions` (budget in billions. Example values: [9.96,...
SELECT DISTINCT T1.creation FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T3.born_state = 'Alabama'
SELECT DISTINCT T1.creation FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T3.born_state = 'Alabama'
department_management
Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'?
Table department, columns = [`department_id` (department id), `name` (name), `creation` (creation), `ranking` (ranking), `budget_in_billions` (budget in billions), `num_employees` (num employees)] Table head, columns = [`head_id` (head id), `name` (name), `born_state` (born state), `age` (age)] Table management, colum...
Table department, columns = [`department_id` (department id. Example values: [1, 2, 3]), `name` (name. Example values: [State, Treasury, Defense]), `creation` (creation. Example values: [1789, 1947, 1870]), `ranking` (ranking. Example values: [1, 2, 3]), `budget_in_billions` (budget in billions. Example values: [9.96,...
SELECT T1.name , T1.num_employees FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting = 'Yes'
SELECT T1.name, T1.num_employees FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting IN ('Yes', 'Affirmative')
shipping
Among all the shipments to Maryland, what is the percentage of the shipment to Davis?
"Florida" is the state; "Jacksonville" is city_name;
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT CAST(SUM(CASE WHEN T2.city_name = 'Davis' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state = 'Maryland'
SELECT CAST(SUM(CASE WHEN T2.city_name IN ('City of Davis', 'Davis') THEN 1 ELSE 0 END) AS FLOAT) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state IN ('Maryland state', 'Maryland, USA', 'Maryland')
shipping
Among all the shipments to Kentucky, what is the percentage of the shipment to Gardena?
"Florida" is the state; "Jacksonville" is city_name;
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT CAST(SUM(CASE WHEN T2.city_name = 'Gardena' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state = 'Kentucky'
SELECT CAST(SUM(CASE WHEN T2.city_name = 'Gardena' THEN 1 ELSE 0 END) AS FLOAT) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state = 'Kentucky'
shipping
Among the shipments shipped to Bristol, DC, how many shipments weighed between 9,000 to 15,000?
"Cicero" is the city; 'Illinois' is the state
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.city_name = 'Bristol' AND T2.state = 'DC' AND T1.weight BETWEEN 9000 AND 15000
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.city_name IN ('Bristol', 'Bristol city') AND T2.state = 'DC' AND T1.weight BETWEEN 9000 AND 15000
shipping
How many cities are in South Carolina?
"Connecticut" is the state
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM city WHERE state = 'South Carolina'
SELECT COUNT(*) FROM city WHERE state = 'South Carolina'
shipping
How many cities are in Wisconsin?
"Connecticut" is the state
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM city WHERE state = 'Wisconsin'
SELECT COUNT(*) FROM city WHERE state IN ('State of Wisconsin', 'Wisconsin')
shipping
How many cities are in Idaho?
"Connecticut" is the state
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM city WHERE state = 'Idaho'
SELECT COUNT(*) FROM city WHERE state IN ('Idaho', 'Idaho state')
shipping
What is the most populated city in Michigan?
in California refers to state = 'CA'; most populated city refers to Max(population)
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT city_name FROM city WHERE state = 'Michigan' AND population = ( SELECT MAX(population) FROM city WHERE state = 'Michigan' )
SELECT city_name FROM city WHERE state IN ('MI, USA', 'State of Michigan', 'Michigan state', 'Michigan region', 'Michigan') AND population = (SELECT MAX(population) FROM city WHERE state IN ('MI, USA', 'State of Michigan', 'Michigan state', 'Michigan region', 'Michigan'))
shipping
What is the most populated city in Louisiana?
in California refers to state = 'CA'; most populated city refers to Max(population)
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT city_name FROM city WHERE state = 'Louisiana' AND population = ( SELECT MAX(population) FROM city WHERE state = 'Louisiana' )
SELECT city_name FROM city WHERE state IN ('Louisiana', 'Louisiana state') AND population = (SELECT MAX(population) FROM city WHERE state IN ('Louisiana', 'Louisiana state'))
shipping
How many shipments were shipped to the least populated city in Missouri?
"California" is the state; least populated city refers to Min(population)
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(T3.city_name) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id INNER JOIN city AS T3 ON T3.city_id = T2.city_id WHERE T3.state = 'Missouri' ORDER BY T3.population ASC LIMIT 1
SELECT COUNT(T3.city_name) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id INNER JOIN city AS T3 ON T3.city_id = T2.city_id WHERE T3.state IN ('Missouri', 'Missouri state', 'Missouri region') ORDER BY T3.population ASC LIMIT 1
shipping
How many shipments were shipped to the least populated city in North Dakota?
"California" is the state; least populated city refers to Min(population)
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(T3.city_name) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id INNER JOIN city AS T3 ON T3.city_id = T2.city_id WHERE T3.state = 'North Dakota' ORDER BY T3.population ASC LIMIT 1
SELECT COUNT(T3.city_name) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id INNER JOIN city AS T3 ON T3.city_id = T2.city_id WHERE T3.state IN ('North Dakota state', 'North Dakota') ORDER BY T3.population ASC LIMIT 1
shipping
Among the shipments in 2017, how many of them have the destination in Indiana?
in 2017 refers to Cast(ship_date AS DATE) = 2017; 'New Jersey' is the state
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE STRFTIME('%Y', T1.ship_date) = '2017' AND T2.state = 'Indiana'
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE STRFTIME('%Y', T1.ship_date) = '2017' AND T2.state IN ('Indiana', 'Indiana territory')
shipping
Among the shipments in 2017, how many of them have the destination in Nebraska?
in 2017 refers to Cast(ship_date AS DATE) = 2017; 'New Jersey' is the state
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE STRFTIME('%Y', T1.ship_date) = '2017' AND T2.state = 'Nebraska'
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE STRFTIME('%Y', T1.ship_date) = '2017' AND T2.state = 'Nebraska'
shipping
How many cities which belong to Ohio have transported weight greater than 20000?
"New Jersey" is the state; transported weight greater than 20000 refers to Sum(weight) > 20000
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM ( SELECT T2.city_id AS CITYID FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state = 'Ohio' GROUP BY T2.city_id HAVING SUM(T1.weight) > 20000 )
SELECT COUNT(*) FROM (SELECT T2.city_id AS CITYID FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state = 'Ohio' GROUP BY T2.city_id HAVING SUM(T1.weight) > 20000)
shipping
How many cities which belong to Oregon have transported weight greater than 20000?
"New Jersey" is the state; transported weight greater than 20000 refers to Sum(weight) > 20000
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM ( SELECT T2.city_id AS CITYID FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state = 'Oregon' GROUP BY T2.city_id HAVING SUM(T1.weight) > 20000 )
SELECT COUNT(*) FROM (SELECT T2.city_id AS CITYID FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state IN ('Oregon state', 'US-OR state', 'Oregon, USA', 'Oregon') GROUP BY T2.city_id HAVING SUM(T1.weight) > 20000)
shipping
How many cities are in Connecticut?
"Connecticut" is the state
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM city WHERE state = 'Connecticut'
SELECT COUNT(*) FROM city WHERE state IN ('Connecticut', 'Connecticut, USA')
shipping
Among all the shipments to Florida, what is the percentage of the shipment to Jacksonville?
"Florida" is the state; "Jacksonville" is city_name;
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT CAST(SUM(CASE WHEN T2.city_name = 'Jacksonville' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state = 'Florida'
SELECT CAST(SUM(CASE WHEN T2.city_name = 'Jacksonville' THEN 1 ELSE 0 END) AS FLOAT) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state IN ('State of Florida', 'Florida', 'Florida, USA', 'FL state')
shipping
Among the shipments shipped to Cicero, Illinois, how many shipments weighed between 9,000 to 15,000?
"Cicero" is the city; 'Illinois' is the state
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.city_name = 'Cicero' AND T2.state = 'Illinois' AND T1.weight BETWEEN 9000 AND 15000
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.city_name = 'Cicero' AND T2.state = 'Illinois' AND T1.weight BETWEEN 9000 AND 15000
shipping
What is the most populated city in California?
in California refers to state = 'CA'; most populated city refers to Max(population)
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT city_name FROM city WHERE state = 'California' AND population = ( SELECT MAX(population) FROM city WHERE state = 'California' )
SELECT city_name FROM city WHERE state = 'California' AND population = (SELECT MAX(population) FROM city WHERE state = 'California')
shipping
How many shipments were shipped to the least populated city in California?
"California" is the state; least populated city refers to Min(population)
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(T3.city_name) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id INNER JOIN city AS T3 ON T3.city_id = T2.city_id WHERE T3.state = 'California' ORDER BY T3.population ASC LIMIT 1
SELECT COUNT(T3.city_name) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id INNER JOIN city AS T3 ON T3.city_id = T2.city_id WHERE T3.state = 'California' ORDER BY T3.population ASC LIMIT 1
shipping
Among the shipments in 2017, how many of them have the destination in New Jersey?
in 2017 refers to Cast(ship_date AS DATE) = 2017; 'New Jersey' is the state
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE STRFTIME('%Y', T1.ship_date) = '2017' AND T2.state = 'New Jersey'
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE STRFTIME('%Y', T1.ship_date) = '2017' AND T2.state IN ('New Jersey, USA', 'State of New Jersey', 'New Jersey')
shipping
How many cities which belong to New Jersey have transported weight greater than 20000?
"New Jersey" is the state; transported weight greater than 20000 refers to Sum(weight) > 20000
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM ( SELECT T2.city_id AS CITYID FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state = 'New Jersey' GROUP BY T2.city_id HAVING SUM(T1.weight) > 20000 )
SELECT COUNT(*) FROM (SELECT T2.city_id AS CITYID FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state IN ('New Jersey, USA', 'State of New Jersey', 'New Jersey') GROUP BY T2.city_id HAVING SUM(T1.weight) > 20000)
shipping
Among the shipments for Laguna Niguel, how many shipments were shipped to California in 2016?
"Downey" is the city_name; 'California' is the state, whose abbreviation is CA; in 2016 refers to year(ship_date) = 2016,
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T3.cust_id = T1.cust_id WHERE T2.city_name = 'Laguna Niguel' AND STRFTIME('%Y', T1.ship_date) = '2016' AND T3.state = 'CA'
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T3.cust_id = T1.cust_id WHERE T2.city_name = 'Laguna Niguel' AND STRFTIME('%Y', T1.ship_date) = '2016' AND T3.state IN ('CA', 'Golden State')
shipping
Among the shipments for Ann Arbor, how many shipments were shipped to California in 2016?
"Downey" is the city_name; 'California' is the state, whose abbreviation is CA; in 2016 refers to year(ship_date) = 2016,
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T3.cust_id = T1.cust_id WHERE T2.city_name = 'Ann Arbor' AND STRFTIME('%Y', T1.ship_date) = '2016' AND T3.state = 'CO'
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T3.cust_id = T1.cust_id WHERE T2.city_name = 'Ann Arbor' AND STRFTIME('%Y', T1.ship_date) = '2016' AND T3.state IN ('CO', 'Colorado, USA')
shipping
Among the shipments for Las Cruces, how many shipments were shipped to California in 2016?
"Downey" is the city_name; 'California' is the state, whose abbreviation is CA; in 2016 refers to year(ship_date) = 2016,
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T3.cust_id = T1.cust_id WHERE T2.city_name = 'Las Cruces' AND STRFTIME('%Y', T1.ship_date) = '2016' AND T3.state = 'IA'
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T3.cust_id = T1.cust_id WHERE T2.city_name = 'Las Cruces' AND STRFTIME('%Y', T1.ship_date) = '2016' AND T3.state = 'IA'
shipping
Among the shipments for Downey, how many shipments were shipped to California in 2016?
"Downey" is the city_name; 'California' is the state, whose abbreviation is CA; in 2016 refers to year(ship_date) = 2016,
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T3.cust_id = T1.cust_id WHERE T2.city_name = 'Downey' AND STRFTIME('%Y', T1.ship_date) = '2016' AND T3.state = 'CA'
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T3.cust_id = T1.cust_id WHERE T2.city_name IN ('Downey, CA', 'Downey') AND STRFTIME('%Y', T1.ship_date) = '2016' AND T3.state IN ('CA', 'Golden State')
shipping
What is the address of the driver that delivers the shipment for the customer lives at 7052 Carroll Road, Detroit, California?
"7052 Carroll Road" is the address of customer; 'San Diego' is the city; 'California' is the state
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT T3.address FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id INNER JOIN driver AS T3 ON T3.driver_id = T1.driver_id WHERE T2.address = '7052 Carroll Road' AND T2.city = 'Detroit' AND T2.state = 'AZ'
SELECT T3.address FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id INNER JOIN driver AS T3 ON T3.driver_id = T1.driver_id WHERE T2.address = '7052 Carroll Road' AND T2.city = 'Detroit' AND T2.state IN ('AZ', 'AZ, United States')
shipping
What is the address of the driver that delivers the shipment for the customer lives at 7052 Carroll Road, Sunnyvale, California?
"7052 Carroll Road" is the address of customer; 'San Diego' is the city; 'California' is the state
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT T3.address FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id INNER JOIN driver AS T3 ON T3.driver_id = T1.driver_id WHERE T2.address = '7052 Carroll Road' AND T2.city = 'Sunnyvale' AND T2.state = 'IL'
SELECT T3.address FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id INNER JOIN driver AS T3 ON T3.driver_id = T1.driver_id WHERE T2.address = '7052 Carroll Road' AND T2.city = 'Sunnyvale' AND T2.state IN ('IL', 'Illinois, USA')
shipping
How many customers who live in California that are retailers?
"retailer" is the cust_type; live in California refers to state = 'CA'
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM customer WHERE cust_type = 'retailer' AND state = 'CA'
SELECT COUNT(*) FROM customer WHERE cust_type IN ('retailer', 'retail company', 'retail seller') AND state IN ('CA', 'Golden State')
shipping
How many shipments were shipped to customers living in California in year 2016?
living in California refers to state = 'CA'; in year 2016 refers to CAST(ship_date AS DATE) = 2016
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) AS per FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE STRFTIME('%Y', T2.ship_date) = '2016' AND T1.state = 'CA'
SELECT COUNT(*) AS per FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE STRFTIME('%Y', T2.ship_date) = '2016' AND T1.state IN ('CA', 'Golden State')
shipping
What is the address of the driver that delivers the shipment for the customer lives at 7052 Carroll Road, San Diego, California?
"7052 Carroll Road" is the address of customer; 'San Diego' is the city; 'California' is the state
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT T3.address FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id INNER JOIN driver AS T3 ON T3.driver_id = T1.driver_id WHERE T2.address = '7052 Carroll Road' AND T2.city = 'San Diego' AND T2.state = 'CA'
SELECT T3.address FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id INNER JOIN driver AS T3 ON T3.driver_id = T1.driver_id WHERE T2.address = '7052 Carroll Road' AND T2.city = 'San Diego' AND T2.state IN ('CA', 'Golden State')
shipping
How many shipments were delivered to a customer from New York?
"New York" refers to state = 'NY'
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.state = 'NY'
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.state IN ('New York', 'NY')
shipping
Provide the ship date of the first shipment to customers in South Carolina.
"South Carolina" refers to state = 'SC'; first shipment refers to Min(ship_date)
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT MIN(T1.ship_date) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.state = 'SC'
SELECT MIN(T1.ship_date) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.state = 'SC'
shipping
How many shipments were ordered by a customer in Florida?
customer in Florida refers to state = 'FL'
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(T1.cust_id) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.state = 'FL'
SELECT COUNT(T1.cust_id) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.state IN ('FL state', 'FL', 'Florida, USA')
shipping
Determine the percentage of manufacturers who are from Texas among all of Lorenzo's customers.
"Texas" refers to state = 'TX'; 'manufacturer' is the cust_type; percentage = Divide (Count(cust_id where state = 'TX'), Count(cust_id)) * 100
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT CAST(SUM(CASE WHEN cust_type = 'manufacturer' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM customer WHERE state = 'TX'
SELECT CAST(SUM(CASE WHEN cust_type IN ('manufacturing company', 'manufacturer type', 'maker', 'manufacturer') THEN 1 ELSE 0 END) AS FLOAT) * 100 / COUNT(*) FROM customer WHERE state IN ('TX state', 'Texas, USA', 'Lone Star State', 'TX')
shipping
Among the shipments to a customer from Texas, what percentage of the shipments shipped in 2017?
"Texas" refers to state = 'TX'; shipped in 2017 refers to CAST(ship_date AS DATE) = 2017; percentage = Divide (Count (ship_id where CAST(ship_date AS DATE) = 2017), Count (ship_id)) * 100
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', T1.ship_date) = '2017' THEN 1 ELSE 0 END) AS REAL ) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.state = 'TX'
SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', T1.ship_date) = '2017' THEN 1 ELSE 0 END) AS FLOAT) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.state IN ('TX state', 'Texas, USA', 'Lone Star State', 'TX')
shipping
Please list the IDs of all the shipments made by a retailer customer.
"retailer" is the cust_type;  IDs of shipments refers to ship_id
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT T2.ship_id FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_type = 'retailer'
SELECT T2.ship_id FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_type IN ('retailer', 'retail company', 'retail seller')
shipping
How many customers are manufacturer?
"manufacturer" is the cust_type
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT COUNT(*) FROM customer WHERE cust_type = 'manufacturer'
SELECT COUNT(*) FROM customer WHERE cust_type IN ('manufacturing company', 'manufacturer type', 'maker', 'manufacturer')
shipping
What is the percentage of wholesaler customers who have shipment weight of not greater than 70000 pounds?
"wholesaler" is the cust_type; weight of not greater than 70000 pounds refers to weight < 70000; percentage = Divide (Count(cust_id where weight < 70000), Count(cust_id)) * 100
Table city, columns = [`city_id` (city id), `city_name` (city name), `state` (state), `population` (population), `area` (area)] Table customer, columns = [`cust_id` (customer id), `cust_name` (customer name), `annual_revenue` (annual revenue), `cust_type` (customer type), `address` (address), `city` (city), `state` (s...
Table city, columns = [`city_id` (city id. Example values: [100, 101, 102]), `city_name` (city name. Example values: [Union City, Huntington Park, Passaic]), `state` (state. Example values: [State of New Jersey, California, New Jersey, USA]), `population` (population. Example values: [67088, 61348, 67861]), `area` (ar...
SELECT CAST(SUM(CASE WHEN T2.weight < 70000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_type = 'wholesaler'
SELECT CAST(SUM(CASE WHEN T2.weight < 70000 THEN 1 ELSE 0 END) AS FLOAT) * 100 / COUNT(*) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_type IN ('wholesaler', 'wholesaler client', 'wholesaler type')
address
Which district has the largest land area in Delaware? Write the full name of the congress representative and include the postal codes.
"Wisconsin" is the state; largest land area refers to Max(land_area); full name refers to first_name, last_name; postal code refers to zip_code
Table CBSA, columns = [`cbsa` (cbsa), `cbsa_name` (cbsa name), `cbsa_type` (cbsa type)] Table state, columns = [`abbreviation` (abbreviation), `name` (name)] Table congress, columns = [`cognress_rep_id` (congress representative id), `first_name` (first name), `last_name` (last name), `cid` (cid), `party` (party), `sta...
Table CBSA, columns = [`cbsa` (cbsa. Example values: [10300, 10380, 10420]), `cbsa_name` (cbsa name. Example values: [Adrian, MI, Aguadilla-Isabela, PR, Akron, OH]), `cbsa_type` (cbsa type. Example values: [Micro, Metro])] Table state, columns = [`abbreviation` (abbreviation. Example values: [AA, AE, AK]), `name` (nam...
SELECT T2.zip_code, T1.first_name, T1.last_name FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.state = 'Delaware' ORDER BY T1.land_area DESC LIMIT 1
SELECT T2.zip_code, T1.first_name, T1.last_name FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.state IN ('Delaware', 'Delaware state', 'Delaware, USA') ORDER BY T1.land_area DESC LIMIT 1
address
How many postal points are there under the congress representative in New York?
postal points refer to zip_code; Puerto Rico refers to state = 'Puerto Rico';
Table CBSA, columns = [`cbsa` (cbsa), `cbsa_name` (cbsa name), `cbsa_type` (cbsa type)] Table state, columns = [`abbreviation` (abbreviation), `name` (name)] Table congress, columns = [`cognress_rep_id` (congress representative id), `first_name` (first name), `last_name` (last name), `cid` (cid), `party` (party), `sta...
Table CBSA, columns = [`cbsa` (cbsa. Example values: [10300, 10380, 10420]), `cbsa_name` (cbsa name. Example values: [Adrian, MI, Aguadilla-Isabela, PR, Akron, OH]), `cbsa_type` (cbsa type. Example values: [Micro, Metro])] Table state, columns = [`abbreviation` (abbreviation. Example values: [AA, AE, AK]), `name` (nam...
SELECT COUNT(T2.zip_code) FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.state = 'New York'
SELECT COUNT(T2.zip_code) FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.state IN ('New York', 'New York State', 'Queens, New York')
address
Which district has the largest land area in Missouri? Write the full name of the congress representative and include the postal codes.
"Wisconsin" is the state; largest land area refers to Max(land_area); full name refers to first_name, last_name; postal code refers to zip_code
Table CBSA, columns = [`cbsa` (cbsa), `cbsa_name` (cbsa name), `cbsa_type` (cbsa type)] Table state, columns = [`abbreviation` (abbreviation), `name` (name)] Table congress, columns = [`cognress_rep_id` (congress representative id), `first_name` (first name), `last_name` (last name), `cid` (cid), `party` (party), `sta...
Table CBSA, columns = [`cbsa` (cbsa. Example values: [10300, 10380, 10420]), `cbsa_name` (cbsa name. Example values: [Adrian, MI, Aguadilla-Isabela, PR, Akron, OH]), `cbsa_type` (cbsa type. Example values: [Micro, Metro])] Table state, columns = [`abbreviation` (abbreviation. Example values: [AA, AE, AK]), `name` (nam...
SELECT T2.zip_code, T1.first_name, T1.last_name FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.state = 'Missouri' ORDER BY T1.land_area DESC LIMIT 1
SELECT T2.zip_code, T1.first_name, T1.last_name FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.state IN ('Missouri', 'Missouri state') ORDER BY T1.land_area DESC LIMIT 1
End of preview.
README.md exists but content is empty.
Downloads last month
56

Collection including griffith-bigdata/ambival