instruction
stringlengths 42
296
| input
stringlengths 27
86
| output
stringlengths 66
193
|
---|---|---|
The database contains a 'transactionalplms.trip' table with columns like 'id', 'status', 'gateOut', and 'vehicleNumber'. The task is to retrieve the latest trip information for a vehicle number. Limit the results to the most recent trip. | Where is vehicle JH11AG0663? | SELECT id AS trip_id, status, gateOut FROM transactionalplms.trip WHERE vehicleNumber = 'JH11AG0663' ORDER BY gateOut DESC LIMIT 1; |
The 'transactionalplms.trip' table has a 'mapPlantStageLocation' column that tracks where vehicles are in the plant. The task is to count vehicles that are in the 'YARD-IN' stage, indicating they are at the plant. | How many vehicles are currently at our plant? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE mapPlantStageLocation = 'YARD-IN'; |
The 'transactionalplms.trip' table contains a 'packingOut' column that indicates the timestamp when a vehicle completes tareweight. The task is to retrieve the latest tareweight completion time for a vehicle. | When did vehicle JH11AG0663 complete tareweight? | SELECT packingOut FROM transactionalplms.trip WHERE vehicleNumber = 'JH11AG0663' ORDER BY packingOut DESC LIMIT 1; |
The 'transactionalplms.trip' table contains a 'driverId' column that tracks the driver assigned to a vehicle. The task is to retrieve the driver ID for the latest trip of the vehicle. | Who is the assigned driver for vehicle JH09AR8268? | SELECT driverId FROM transactionalplms.trip WHERE vehicleNumber = 'JH09AR8268' ORDER BY gateIn DESC LIMIT 1; |
The 'transactionalplms.trip' table has a 'gateIn' column that records the time a vehicle enters the plant. The task is to retrieve the gate-in time for the given vehicle number. | When did vehicle UP32AA1010 enter the plant? | SELECT gateIn FROM transactionalplms.trip WHERE vehicleNumber = 'UP32AA1010' ORDER BY gateIn DESC LIMIT 1; |
The 'transactionalplms.trip' table contains a 'materialType_code' column that tracks the type of goods loaded in a vehicle. The task is to retrieve the material type for the latest trip of the vehicle. | What goods are loaded in vehicle JH09AR8268? | SELECT materialType_code FROM transactionalplms.trip WHERE vehicleNumber = 'JH09AR8268' ORDER BY gateIn DESC LIMIT 1; |
The 'transactionalplms.trip' table has a 'gateOut' column that records the time a vehicle leaves the plant. The task is to retrieve the gate-out time for the last vehicle that unloaded at the plant, filtered by the 'GATE-OUT' location. | When did the last vehicle unload at the plant? | SELECT gateOut FROM transactionalplms.trip WHERE mapPlantStageLocation = 'GATE-OUT' ORDER BY gateOut DESC LIMIT 1; |
The 'transactionalplms.trip' table has an 'id' column, which is the trip ID. The task is to retrieve the trip ID for the latest trip of the given vehicle. | What is the trip ID for vehicle JH09AR8268? | SELECT tripId FROM transactionalplms.trip WHERE vehicleNumber = 'JH09AR8268' ORDER BY gateIn DESC LIMIT 1; |
The 'transactionalplms.trip' table contains an 'id' column for the trip ID, a 'status' column indicating the trip status, and a 'gateOut' column recording when the trip is completed. The task is to check if a trip is completed by verifying the status and whether the 'gateOut' field is populated. | Is trip TRIP9876 completed? | SELECT gateOut FROM transactionalplms.trip WHERE id = '20240418175619192' AND status = 'C' LIMIT 1; |
The 'transactionalplms.trip' table contains a 'packingIn' column, which records when a vehicle started loading or unloading. The task is to retrieve the start time of packing for a given vehicle number. | When did vehicle JH11AG0663 start packing? | SELECT packingIn FROM transactionalplms.trip WHERE vehicleNumber = 'JH11AG0663' ORDER BY packingIn DESC LIMIT 1; |
The 'transactionalplms.trip' table contains a 'mapPlantStageLocation' column that tracks the current stage of the vehicle in the plant. The task is to retrieve the current location of the given vehicle number. | Where is vehicle JH11AG0663? | SELECT mapPlantStageLocation FROM transactionalplms.trip WHERE vehicleNumber = 'JH11AG0663' ORDER BY gateIn DESC LIMIT 1; |
The 'transactionalplms.trip' table contains a 'gateIn' and 'gateOut' column. The task is to retrieve both the entry and exit times for a specific vehicle. | When did vehicle JH09AR8268 enter and exit the plant? | SELECT gateIn, gateOut FROM transactionalplms.trip WHERE vehicleNumber = 'UP32AA1010' ORDER BY gateIn DESC LIMIT 1; |
The task is to check if vehicle JH10CS206 has completed the 'YARD-IN' process, which is tracked in the 'mapPlantStageLocation' column. | Has vehicle JH10CS206 completed the Yard-In process? | SELECT mapPlantStageLocation FROM transactionalplms.trip WHERE vehicleNumber = 'JH10CS206' AND mapPlantStageLocation = 'YARD-IN' LIMIT 1; |
The task is to count the number of trips created today. | How many trips are being made today? | SELECT COUNT(*) AS trip_count FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE; |
The task is to retrieve the current stage for the vehicle with number JH10CS206. | In which stage is vehicle number JH10CS206? | SELECT mapPlantStageLocation FROM transactionalplms.trip WHERE vehicleNumber = 'JH10CS206' ORDER BY gateIn DESC LIMIT 1; |
The task is to retrieve the tareweight time for vehicle MH34BG1275. | TareWeight time for this vehicle MH34BG1275? | SELECT packingOut FROM transactionalplms.trip WHERE vehicleNumber = 'MH34BG1275' ORDER BY packingOut DESC LIMIT 1; |
The task is to calculate the time difference between entry and exit for vehicle TS01UC241. | How much time did TS01UC241 take from Entry to Exit? | SELECT TIMESTAMPDIFF(MINUTE, gateIn, gateOut) AS time_taken FROM transactionalplms.trip WHERE vehicleNumber = 'TS01UC241' ORDER BY gateIn DESC LIMIT 1; |
The task is to count the stages completed by vehicle UP53ET7162. | How many stages are completed by UP53ET7162? | SELECT COUNT(DISTINCT mapPlantStageLocation) AS stages_completed FROM transactionalplms.trip WHERE vehicleNumber = 'UP53ET7162'; |
The task is to retrieve the material description for material code 'COMP'. | Tell me which material has this code COMP? | SELECT description FROM transactionalplms.material WHERE code = 'COMP'; |
The task is to retrieve the material type for the latest trip of vehicle JH02P2241. | What material type is this vehicle number carrying JH02P2241? | SELECT materialType_code FROM transactionalplms.trip WHERE vehicleNumber = 'JH02P2241' ORDER BY gateIn DESC LIMIT 1; |
The task is to count the number of vehicles currently at the N205 stage. | How many vehicles are currently at N205? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE mapPlantStageLocation = 'N205'; |
The task is to count vehicles currently in the 'GATE-OUT' stage. | How many vehicles are in the gate out stage? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE mapPlantStageLocation = 'GATE-OUT'; |
The task is to calculate the average time vehicles spend in the 'YARD-IN' stage. | How much time on average does a vehicle take in Yard-IN? | SELECT AVG(TIMESTAMPDIFF(MINUTE, yardIn, yardOut)) AS avg_time FROM transactionalplms.trip WHERE mapPlantStageLocation = 'YARD-IN'; |
The task is to retrieve the tareweight time and date for vehicles JH10CD0283 and MH33T4122. | Tareweight time and date of JH10CD0283, MH33T4122? | SELECT vehicleNumber, packingOut FROM transactionalplms.trip WHERE vehicleNumber IN ('JH10CD0283', 'MH33T4122') ORDER BY packingOut DESC; |
The task is to count the number of vehicles aborted today. | How many vehicles have been aborted today? | SELECT COUNT(*) AS aborted_count FROM transactionalplms.trip WHERE status = 'A' AND DATE(gateIn) = CURRENT_DATE; |
The task is to find the vehicle number associated with a specific trip ID. | I am not able to find the vehicle number related to this 2024042514482296? | SELECT vehicleNumber FROM transactionalplms.trip WHERE id = '2024042514482296'; |
The task is to count stages completed by vehicle MH02ER9382. | How many stages has been covered by this MH02ER9382? | SELECT COUNT(DISTINCT mapPlantStageLocation) AS stages_covered FROM transactionalplms.trip WHERE vehicleNumber = 'MH02ER9382'; |
The task is to find the sequence number for vehicle jh10cr1855. | In which sequence number is this vehicle jh10cr1855? | SELECT sequence_number FROM transactionalplms.trip WHERE vehicleNumber = 'jh10cr1855' ORDER BY gateIn DESC LIMIT 1; |
The task is to calculate the average time a vehicle takes between Packing IN and Packing Out. | On average, how much time does a vehicle take between Packing IN and Packing Out? | SELECT AVG(TIMESTAMPDIFF(MINUTE, packingIn, packingOut)) AS avg_packing_time FROM transactionalplms.trip WHERE packingIn IS NOT NULL AND packingOut IS NOT NULL; |
The task is to count trips with 'S' creation type and 'C' status. | How many vehicles have trip creation S with C status? | SELECT COUNT(*) AS trip_count FROM transactionalplms.trip WHERE creationType = 'S' AND status = 'C'; |
The task is to count trips with no issues. | How many trips have been done by vehicles without any issues? | SELECT COUNT(*) AS trip_count FROM transactionalplms.trip WHERE status = 'C'; |
The task is to count vehicles with the 'PSC' material type today. | How many vehicles have this material PSC today? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE materialType_code = 'PSC' AND DATE(gateIn) = CURRENT_DATE; |
The task is to find the trip ID associated with a given serial number. | Which trip is associated with Serial number 559? | SELECT id FROM transactionalplms.trip WHERE serial_number = '559'; |
The task is to count vehicles associated with the company IN20. | How many vehicles are associated with this company IN20 and provide count too? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE company_code = 'IN20'; |
The task is to count vehicles handling both COMP and PPC materials. | How many vehicles are handling COMP and PPC? | SELECT COUNT(DISTINCT vehicleNumber) AS vehicle_count FROM transactionalplms.trip WHERE materialType_code IN ('COMP', 'PPC'); |
The task is to find the vehicle that took the maximum time from entry to exit today. | Which vehicle took the maximum time from entry to exit today? | SELECT vehicleNumber, TIMESTAMPDIFF(MINUTE, gateIn, gateOut) AS time_taken FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE ORDER BY time_taken DESC LIMIT 1; |
The task is to find the vehicle details and stage count for vehicle ID 1005. | Which vehicle is with this ID 1005 and how many stages are being done by this vehicle? | SELECT vehicleNumber, COUNT(DISTINCT mapPlantStageLocation) AS stages_completed FROM transactionalplms.trip WHERE id = '1005'; |
The task is to find the current location of vehicle MH04DS5386. | Where is this MH04DS5386 right now? | SELECT mapPlantStageLocation FROM transactionalplms.trip WHERE vehicleNumber = 'MH04DS5386' ORDER BY gateIn DESC LIMIT 1; |
The task is to find the vehicle with the minimum time to complete stages today. | Which vehicle has the minimum time to complete the stages today? | SELECT vehicleNumber, TIMESTAMPDIFF(MINUTE, gateIn, gateOut) AS time_taken FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE AND gateOut IS NOT NULL ORDER BY time_taken ASC LIMIT 1; |
The task is to count the goods being handled by company IN10. | How many goods are being handled by IN10? | SELECT COUNT(*) AS goods_count FROM transactionalplms.trip WHERE company_code = 'IN10'; |
The task is to count the number of vehicles present in the plant until 3 PM today. | How many vehicles were there till 3pm? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE AND TIME(gateIn) <= '15:00:00'; |
The task is to find the vehicle with the maximum time to complete stages today. | Which vehicle has the maximum time to complete the stages today? | SELECT vehicleNumber, TIMESTAMPDIFF(MINUTE, gateIn, gateOut) AS time_taken FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE ORDER BY time_taken DESC LIMIT 1; |
The task is to count the total number of vehicles in each stage right now. | Can you show me the total count of vehicles in each stage right now? | SELECT mapPlantStageLocation, COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE GROUP BY mapPlantStageLocation; |
The task is to count the number of vehicles currently in the Packing-Out stage. | How many vehicles are currently in the Packing-Out stage? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE mapPlantStageLocation = 'Packing-Out'; |
The task is to count the number of vehicles currently between Yard-Out and Gate-Out. | How many vehicles are currently in between Yard-Out and Gate-Out right now? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE mapPlantStageLocation IN ('Yard-Out', 'Gate-Out'); |
The task is to count the number of vehicles with status 'C'. | How many vehicles got status C? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE status = 'C'; |
The task is to count the stages completed by vehicle ID 764. | How many stages are being completed by this ID 764? | SELECT COUNT(DISTINCT mapPlantStageLocation) AS stages_completed FROM transactionalplms.trip WHERE id = '764'; |
The task is to count the number of vehicles that completed the Packing-In stage. | How many vehicles completed the packing-in stage? | SELECT COUNT(*) AS completed_count FROM transactionalplms.trip WHERE mapPlantStageLocation = 'Packing-In' AND packingIn IS NOT NULL; |
The task is to find when vehicle MH40CD7766 completed the Yard-IN stage. | When did vehicle MH40CD7766 complete the YardIN? | SELECT yardIn FROM transactionalplms.trip WHERE vehicleNumber = 'MH40CD7766' ORDER BY yardIn DESC LIMIT 1; |
The task is to count the number of vehicles that exited the plant today. | How many vehicles have exited the plant today? | SELECT COUNT(*) AS exited_count FROM transactionalplms.trip WHERE DATE(gateOut) = CURRENT_DATE; |
The task is to count the number of vehicles currently active within the plant. | What is the total number of vehicles currently active within the plant? | SELECT COUNT(*) AS active_vehicle_count FROM transactionalplms.trip WHERE gateOut IS NULL; |
The task is to find the first vehicle that entered the plant today. | Which vehicle entered the plant first today? | SELECT vehicleNumber FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE ORDER BY gateIn ASC LIMIT 1; |
The task is to count the number of vehicles in the process of loading material type 'COMP'. | How many vehicles are in the process of being loaded with material type COMP? | SELECT COUNT(*) AS loading_count FROM transactionalplms.trip WHERE materialType_code = 'COMP' AND mapPlantStageLocation = 'Loading'; |
The task is to check if vehicle BR23A2793 has completed the Gate-Out stage. | Has vehicle BR23A2793 successfully completed the Gate-Out stage? | SELECT gateOut FROM transactionalplms.trip WHERE vehicleNumber = 'BR23A2793' AND gateOut IS NOT NULL LIMIT 1; |
The task is to count the vehicles present last week. | How many vehicles were there last week? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE WEEK(gateIn) = WEEK(CURRENT_DATE) - 1; |
The task is to find the date with the maximum number of vehicles in the plant. | On which date were the maximum number of vehicles present in the plant? | SELECT DATE(gateIn) AS date, COUNT(*) AS vehicle_count FROM transactionalplms.trip GROUP BY DATE(gateIn) ORDER BY vehicle_count DESC LIMIT 1; |
No dataset card yet
- Downloads last month
- 1