question_id
int64
1
75.7k
db_id
stringclasses
33 values
db_name
stringclasses
4 values
question
stringlengths
19
259
partition
stringclasses
4 values
difficulty
stringclasses
3 values
SQL
stringlengths
25
862
1,201
insurance_fnol
spider
How many services are there?
train
easy
SELECT COUNT(*) FROM services
1,202
insurance_fnol
spider
Count the total number of available services.
train
easy
SELECT COUNT(*) FROM services
1,203
insurance_fnol
spider
Find the names of users who do not have a first notification of loss record.
train
hard
SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id
1,204
insurance_fnol
spider
Which customers do not have a first notification of loss record? Give me the customer names.
train
hard
SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id
1,205
insurance_fnol
spider
Find the names of customers who have used either the service "Close a policy" or the service "Upgrade a policy".
train
hard
SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'close a policy' OR t3.service_name = 'upgrade a policy'
1,206
insurance_fnol
spider
Which customers have used the service named "Close a policy" or "Upgrade a policy"? Give me the customer names.
train
hard
SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'close a policy' OR t3.service_name = 'upgrade a policy'
1,207
insurance_fnol
spider
Find the names of customers who have used both the service "Close a policy" and the service "New policy application".
train
hard
SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'close a policy' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_...
1,208
insurance_fnol
spider
Which customers have used both the service named "Close a policy" and the service named "Upgrade a policy"? Give me the customer names.
train
hard
SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = 'close a policy' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_...
1,209
insurance_fnol
spider
Find the IDs of customers whose name contains "Diana".
train
easy
SELECT customer_id FROM customers WHERE customer_name LIKE '%diana%'
1,210
insurance_fnol
spider
What are the IDs of customers who have "Diana" in part of their names?
train
easy
SELECT customer_id FROM customers WHERE customer_name LIKE '%diana%'
1,211
insurance_fnol
spider
What are the maximum and minimum settlement amount on record?
train
easy
SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements
1,212
insurance_fnol
spider
Find the maximum and minimum settlement amount.
train
easy
SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements
1,213
insurance_fnol
spider
List all the customers in increasing order of IDs.
train
hard
SELECT customer_id, customer_name FROM customers ORDER BY customer_id ASC
1,214
insurance_fnol
spider
What is the ordered list of customer ids?
train
hard
SELECT customer_id, customer_name FROM customers ORDER BY customer_id ASC
1,215
insurance_fnol
spider
Retrieve the open and close dates of all the policies associated with the customer whose name contains "Diana"
train
hard
SELECT t2.date_opened, t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name LIKE '%diana%'
1,216
insurance_fnol
spider
What are the open and close dates of all the policies used by the customer who have "Diana" in part of their names?
train
hard
SELECT t2.date_opened, t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name LIKE '%diana%'
1,217
apartment_rentals
spider
How many apartment bookings are there in total?
train
easy
SELECT COUNT(*) FROM apartment_bookings
1,218
apartment_rentals
spider
Count the total number of apartment bookings.
train
easy
SELECT COUNT(*) FROM apartment_bookings
1,219
apartment_rentals
spider
Show the start dates and end dates of all the apartment bookings.
train
easy
SELECT booking_start_date, booking_end_date FROM apartment_bookings
1,220
apartment_rentals
spider
What are the start date and end date of each apartment booking?
train
easy
SELECT booking_start_date, booking_end_date FROM apartment_bookings
1,221
apartment_rentals
spider
Show all distinct building descriptions.
train
easy
SELECT DISTINCT building_description FROM apartment_buildings
1,222
apartment_rentals
spider
Give me a list of all the distinct building descriptions.
train
easy
SELECT DISTINCT building_description FROM apartment_buildings
1,223
apartment_rentals
spider
Show the short names of the buildings managed by "Emma".
train
easy
SELECT building_short_name FROM apartment_buildings WHERE building_manager = 'emma'
1,224
apartment_rentals
spider
Which buildings does "Emma" manage? Give me the short names of the buildings.
train
easy
SELECT building_short_name FROM apartment_buildings WHERE building_manager = 'emma'
1,225
apartment_rentals
spider
Show the addresses and phones of all the buildings managed by "Brenden".
train
easy
SELECT building_address, building_phone FROM apartment_buildings WHERE building_manager = 'brenden'
1,226
apartment_rentals
spider
What are the address and phone number of the buildings managed by "Brenden"?
train
easy
SELECT building_address, building_phone FROM apartment_buildings WHERE building_manager = 'brenden'
1,227
apartment_rentals
spider
What are the building full names that contain the word "court"?
train
easy
SELECT building_full_name FROM apartment_buildings WHERE building_full_name LIKE '%court%'
1,228
apartment_rentals
spider
Find all the building full names containing the word "court".
train
easy
SELECT building_full_name FROM apartment_buildings WHERE building_full_name LIKE '%court%'
1,229
apartment_rentals
spider
What is the minimum and maximum number of bathrooms of all the apartments?
train
easy
SELECT MIN(bathroom_count), MAX(bathroom_count) FROM apartments
1,230
apartment_rentals
spider
Give me the minimum and maximum bathroom count among all the apartments.
train
easy
SELECT MIN(bathroom_count), MAX(bathroom_count) FROM apartments
1,231
apartment_rentals
spider
What is the average number of bedrooms of all apartments?
train
easy
SELECT AVG(bedroom_count) FROM apartments
1,232
apartment_rentals
spider
Find the average number of bedrooms of all the apartments.
train
easy
SELECT AVG(bedroom_count) FROM apartments
1,233
apartment_rentals
spider
Return the apartment number and the number of rooms for each apartment.
train
easy
SELECT apt_number, room_count FROM apartments
1,234
apartment_rentals
spider
What are the apartment number and the room count of each apartment?
train
easy
SELECT apt_number, room_count FROM apartments
1,235
apartment_rentals
spider
What is the average number of rooms of apartments with type code "Studio"?
train
easy
SELECT AVG(room_count) FROM apartments WHERE apt_type_code = 'studio'
1,236
apartment_rentals
spider
Find the average room count of the apartments that have the "Studio" type code.
train
easy
SELECT AVG(room_count) FROM apartments WHERE apt_type_code = 'studio'
1,237
apartment_rentals
spider
Return the apartment numbers of the apartments with type code "Flat".
train
easy
SELECT apt_number FROM apartments WHERE apt_type_code = 'flat'
1,238
apartment_rentals
spider
Which apartments have type code "Flat"? Give me their apartment numbers.
train
easy
SELECT apt_number FROM apartments WHERE apt_type_code = 'flat'
1,239
apartment_rentals
spider
Return the first names and last names of all guests
train
easy
SELECT guest_first_name, guest_last_name FROM guests
1,240
apartment_rentals
spider
What are the first names and last names of all the guests?
train
easy
SELECT guest_first_name, guest_last_name FROM guests
1,241
apartment_rentals
spider
Return the date of birth for all the guests with gender code "Male".
train
easy
SELECT date_of_birth FROM guests WHERE gender_code = 'male'
1,242
apartment_rentals
spider
What are dates of birth of all the guests whose gender is "Male"?
train
easy
SELECT date_of_birth FROM guests WHERE gender_code = 'male'
1,243
apartment_rentals
spider
Show the apartment numbers, start dates, and end dates of all the apartment bookings.
train
hard
SELECT t2.apt_number, t1.booking_start_date, t1.booking_start_date FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id
1,244
apartment_rentals
spider
What are the apartment number, start date, and end date of each apartment booking?
train
hard
SELECT t2.apt_number, t1.booking_start_date, t1.booking_start_date FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id
1,245
apartment_rentals
spider
What are the booking start and end dates of the apartments with type code "Duplex"?
train
hard
SELECT t1.booking_start_date, t1.booking_start_date FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t2.apt_type_code = 'duplex'
1,246
apartment_rentals
spider
Return the booking start date and end date for the apartments that have type code "Duplex".
train
hard
SELECT t1.booking_start_date, t1.booking_start_date FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t2.apt_type_code = 'duplex'
1,247
apartment_rentals
spider
What are the booking start and end dates of the apartments with more than 2 bedrooms?
train
hard
SELECT t1.booking_start_date, t1.booking_start_date FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t2.bedroom_count > 2
1,248
apartment_rentals
spider
Find the booking start date and end date for the apartments that have more than two bedrooms.
train
hard
SELECT t1.booking_start_date, t1.booking_start_date FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t2.bedroom_count > 2
1,249
apartment_rentals
spider
What is the booking status code of the apartment with apartment number "Suite 634"?
train
hard
SELECT t1.booking_status_code FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t2.apt_number = 'suite 634'
1,250
apartment_rentals
spider
Tell me the booking status code for the apartment with number "Suite 634".
train
hard
SELECT t1.booking_status_code FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t2.apt_number = 'suite 634'
1,251
apartment_rentals
spider
Show the distinct apartment numbers of the apartments that have bookings with status code "Confirmed".
train
hard
SELECT DISTINCT t2.apt_number FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t1.booking_status_code = 'confirmed'
1,252
apartment_rentals
spider
Which apartments have bookings with status code "Confirmed"? Return their apartment numbers.
train
hard
SELECT DISTINCT t2.apt_number FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t1.booking_status_code = 'confirmed'
1,253
apartment_rentals
spider
Show the average room count of the apartments that have booking status code "Provisional".
train
hard
SELECT AVG(room_count) FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t1.booking_status_code = 'provisional'
1,254
apartment_rentals
spider
What is the average room count of the apartments whose booking status code is "Provisional"?
train
hard
SELECT AVG(room_count) FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t1.booking_status_code = 'provisional'
1,255
apartment_rentals
spider
Show the guest first names, start dates, and end dates of all the apartment bookings.
train
hard
SELECT t2.guest_first_name, t1.booking_start_date, t1.booking_start_date FROM apartment_bookings AS t1 JOIN guests AS t2 ON t1.guest_id = t2.guest_id
1,256
apartment_rentals
spider
What are the guest first name, start date, and end date of each apartment booking?
train
hard
SELECT t2.guest_first_name, t1.booking_start_date, t1.booking_start_date FROM apartment_bookings AS t1 JOIN guests AS t2 ON t1.guest_id = t2.guest_id
1,257
apartment_rentals
spider
Show the start dates and end dates of all the apartment bookings made by guests with gender code "Female".
train
hard
SELECT t1.booking_start_date, t1.booking_start_date FROM apartment_bookings AS t1 JOIN guests AS t2 ON t1.guest_id = t2.guest_id WHERE t2.gender_code = 'female'
1,258
apartment_rentals
spider
What are the start date and end date of the apartment bookings made by female guests (gender code "Female")?
train
hard
SELECT t1.booking_start_date, t1.booking_start_date FROM apartment_bookings AS t1 JOIN guests AS t2 ON t1.guest_id = t2.guest_id WHERE t2.gender_code = 'female'
1,259
apartment_rentals
spider
Show the first names and last names of all the guests that have apartment bookings with status code "Confirmed".
train
hard
SELECT t2.guest_first_name, t2.guest_last_name FROM apartment_bookings AS t1 JOIN guests AS t2 ON t1.guest_id = t2.guest_id WHERE t1.booking_status_code = 'confirmed'
1,260
apartment_rentals
spider
Which guests have apartment bookings with status code "Confirmed"? Return their first names and last names.
train
hard
SELECT t2.guest_first_name, t2.guest_last_name FROM apartment_bookings AS t1 JOIN guests AS t2 ON t1.guest_id = t2.guest_id WHERE t1.booking_status_code = 'confirmed'
1,261
apartment_rentals
spider
Show the facility codes of apartments with more than 4 bedrooms.
train
hard
SELECT t1.facility_code FROM apartment_facilities AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t2.bedroom_count > 4
1,262
apartment_rentals
spider
What are the facility codes of the apartments with more than four bedrooms?
train
hard
SELECT t1.facility_code FROM apartment_facilities AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t2.bedroom_count > 4
1,263
apartment_rentals
spider
Show the total number of rooms of all apartments with facility code "Gym".
train
hard
SELECT SUM(t2.room_count) FROM apartment_facilities AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t1.facility_code = 'gym'
1,264
apartment_rentals
spider
Find the total number of rooms in the apartments that have facility code "Gym".
train
hard
SELECT SUM(t2.room_count) FROM apartment_facilities AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t1.facility_code = 'gym'
1,265
apartment_rentals
spider
Show the total number of rooms of the apartments in the building with short name "Columbus Square".
train
hard
SELECT SUM(t2.room_count) FROM apartment_buildings AS t1 JOIN apartments AS t2 ON t1.building_id = t2.building_id WHERE t1.building_short_name = 'columbus square'
1,266
apartment_rentals
spider
How many rooms in total are there in the apartments in the building with short name "Columbus Square"?
train
hard
SELECT SUM(t2.room_count) FROM apartment_buildings AS t1 JOIN apartments AS t2 ON t1.building_id = t2.building_id WHERE t1.building_short_name = 'columbus square'
1,267
apartment_rentals
spider
Show the addresses of the buildings that have apartments with more than 2 bathrooms.
train
hard
SELECT t1.building_address FROM apartment_buildings AS t1 JOIN apartments AS t2 ON t1.building_id = t2.building_id WHERE t2.bathroom_count > 2
1,268
apartment_rentals
spider
Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings.
train
hard
SELECT t1.building_address FROM apartment_buildings AS t1 JOIN apartments AS t2 ON t1.building_id = t2.building_id WHERE t2.bathroom_count > 2
1,269
apartment_rentals
spider
Show the apartment type codes and apartment numbers in the buildings managed by "Kyle".
train
hard
SELECT t2.apt_type_code, t2.apt_number FROM apartment_buildings AS t1 JOIN apartments AS t2 ON t1.building_id = t2.building_id WHERE t1.building_manager = 'kyle'
1,270
apartment_rentals
spider
What apartment type codes and apartment numbers do the buildings managed by "Kyle" have?
train
hard
SELECT t2.apt_type_code, t2.apt_number FROM apartment_buildings AS t1 JOIN apartments AS t2 ON t1.building_id = t2.building_id WHERE t1.building_manager = 'kyle'
1,271
apartment_rentals
spider
Show the booking status code and the corresponding number of bookings.
train
hard
SELECT booking_status_code, COUNT(*) FROM apartment_bookings GROUP BY booking_status_code
1,272
apartment_rentals
spider
How many bookings does each booking status have? List the booking status code and the number of corresponding bookings.
train
hard
SELECT booking_status_code, COUNT(*) FROM apartment_bookings GROUP BY booking_status_code
1,273
apartment_rentals
spider
Return all the apartment numbers sorted by the room count in ascending order.
train
hard
SELECT apt_number FROM apartments ORDER BY room_count ASC
1,274
apartment_rentals
spider
Sort the apartment numbers in ascending order of room count.
train
hard
SELECT apt_number FROM apartments ORDER BY room_count ASC
1,275
apartment_rentals
spider
Return the apartment number with the largest number of bedrooms.
train
hard
SELECT apt_number FROM apartments ORDER BY bedroom_count DESC LIMIT 1
1,276
apartment_rentals
spider
What is the apartment number of the apartment with the most beds?
train
hard
SELECT apt_number FROM apartments ORDER BY bedroom_count DESC LIMIT 1
1,277
apartment_rentals
spider
Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order.
train
hard
SELECT apt_type_code, COUNT(*) FROM apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC
1,278
apartment_rentals
spider
Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments.
train
hard
SELECT apt_type_code, COUNT(*) FROM apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC
1,279
apartment_rentals
spider
Show the top 3 apartment type codes sorted by the average number of rooms in descending order.
train
hard
SELECT apt_type_code FROM apartments GROUP BY apt_type_code ORDER BY AVG(room_count) DESC LIMIT 3
1,280
apartment_rentals
spider
What are the top three apartment types in terms of the average room count? Give me the
train
hard
SELECT apt_type_code FROM apartments GROUP BY apt_type_code ORDER BY AVG(room_count) DESC LIMIT 3
1,281
apartment_rentals
spider
Show the apartment type code that has the largest number of total rooms, together with the number of bathrooms and number of bedrooms.
train
hard
SELECT apt_type_code, bathroom_count, bedroom_count FROM apartments GROUP BY apt_type_code ORDER BY SUM(room_count) DESC LIMIT 1
1,282
apartment_rentals
spider
Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.
train
hard
SELECT apt_type_code, bathroom_count, bedroom_count FROM apartments GROUP BY apt_type_code ORDER BY SUM(room_count) DESC LIMIT 1
1,283
apartment_rentals
spider
Show the most common apartment type code.
train
hard
SELECT apt_type_code FROM apartments GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1
1,284
apartment_rentals
spider
Which apartment type code appears the most often?
train
hard
SELECT apt_type_code FROM apartments GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1
1,285
apartment_rentals
spider
Show the most common apartment type code among apartments with more than 1 bathroom.
train
easy
SELECT apt_type_code FROM apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1
1,286
apartment_rentals
spider
Which apartment type code is the most common among apartments with more than one bathroom?
train
easy
SELECT apt_type_code FROM apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1
1,287
apartment_rentals
spider
Show each apartment type code, and the maximum and minimum number of rooms for each type.
train
hard
SELECT apt_type_code, MAX(room_count), MIN(room_count) FROM apartments GROUP BY apt_type_code
1,288
apartment_rentals
spider
Return each apartment type code along with the maximum and minimum number of rooms among each type.
train
hard
SELECT apt_type_code, MAX(room_count), MIN(room_count) FROM apartments GROUP BY apt_type_code
1,289
apartment_rentals
spider
Show each gender code and the corresponding count of guests sorted by the count in descending order.
train
hard
SELECT gender_code, COUNT(*) FROM guests GROUP BY gender_code ORDER BY COUNT(*) DESC
1,290
apartment_rentals
spider
Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts.
train
hard
SELECT gender_code, COUNT(*) FROM guests GROUP BY gender_code ORDER BY COUNT(*) DESC
1,291
apartment_rentals
spider
How many apartments do not have any facility?
train
easy
SELECT COUNT(*) FROM apartments WHERE NOT apt_id IN (SELECT apt_id FROM apartment_facilities)
1,292
apartment_rentals
spider
Find the number of apartments that have no facility.
train
easy
SELECT COUNT(*) FROM apartments WHERE NOT apt_id IN (SELECT apt_id FROM apartment_facilities)
1,293
apartment_rentals
spider
Show the apartment numbers of apartments with bookings that have status code both "Provisional" and "Confirmed"
train
hard
SELECT t2.apt_number FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t1.booking_status_code = 'confirmed' INTERSECT SELECT t2.apt_number FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t1.booking_status_code = 'provisional'
1,294
apartment_rentals
spider
Which apartments have bookings with both status codes "Provisional" and "Confirmed"? Give me the apartment numbers.
train
hard
SELECT t2.apt_number FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t1.booking_status_code = 'confirmed' INTERSECT SELECT t2.apt_number FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1.apt_id = t2.apt_id WHERE t1.booking_status_code = 'provisional'
1,295
apartment_rentals
spider
Show the apartment numbers of apartments with unit status availability of both 0 and 1.
train
hard
SELECT t1.apt_number FROM apartments AS t1 JOIN view_unit_status AS t2 ON t1.apt_id = t2.apt_id WHERE t2.available_yn = 0 INTERSECT SELECT t1.apt_number FROM apartments AS t1 JOIN view_unit_status AS t2 ON t1.apt_id = t2.apt_id WHERE t2.available_yn = 1
1,296
apartment_rentals
spider
Which apartments have unit status availability of both 0 and 1? Return their apartment numbers.
train
hard
SELECT t1.apt_number FROM apartments AS t1 JOIN view_unit_status AS t2 ON t1.apt_id = t2.apt_id WHERE t2.available_yn = 0 INTERSECT SELECT t1.apt_number FROM apartments AS t1 JOIN view_unit_status AS t2 ON t1.apt_id = t2.apt_id WHERE t2.available_yn = 1
1,297
insurance_and_eClaims
spider
List the names of all the customers in alphabetical order.
train
hard
SELECT customer_details FROM customers ORDER BY customer_details
1,298
insurance_and_eClaims
spider
Sort the customer names in alphabetical order.
train
hard
SELECT customer_details FROM customers ORDER BY customer_details
1,299
insurance_and_eClaims
spider
Find all the policy type codes associated with the customer "Dayana Robel"
train
hard
SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = 'dayana robel'
1,300
insurance_and_eClaims
spider
What are the type codes of the policies used by the customer "Dayana Robel"?
train
hard
SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = 'dayana robel'