instruction
stringlengths 50
112
| input
stringlengths 31
109
| output
stringlengths 59
513
|
---|---|---|
The task is to retrieve the latest trip details for vehicle JH11AG0663. | What is the latest trip ID, DI number, status, and Gate-Out time for vehicle JH11AG0663? | SELECT id AS trip_id, dinumber, status, gateOut FROM transactionalplms.trip WHERE vehicleNumber = 'JH11AG0663' ORDER BY gateOut DESC LIMIT 1; |
The task is to count the number of vehicles currently in the YARD-IN stage. | How many vehicles are currently in the YARD-IN stage? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE mapPlantStageLocation = 'YARD-IN'; |
The task is to find the Packing-Out time and DI number for vehicle JH11AG0663. | What is the latest Packing-Out time for vehicle JH11AG0663? | SELECT trip.packingOut, consignmentdetailob.diNumber FROM transactionalplms.trip JOIN transactionalplms.consignmentdetailob ON trip.id = consignmentdetailob.id WHERE trip.vehicleNumber = 'JH11AG0663' ORDER BY trip.packingOut DESC LIMIT 1; |
The task is to retrieve the latest driver ID for vehicle JH09AR8268. | Who is the latest driver of vehicle JH09AR8268? | SELECT driverId FROM transactionalplms.trip WHERE vehicleNumber = 'JH09AR8268' ORDER BY gateIn DESC LIMIT 1; |
The task is to find the latest Gate-In time and DI number for vehicle JH10CD1265. | What is the latest Gate-In time for vehicle JH10CD1265? | SELECT trip.gateIn, consignmentdetailob.diNumber FROM transactionalplms.trip JOIN transactionalplms.consignmentdetailob ON trip.id = consignmentdetailob.id WHERE trip.vehicleNumber = 'JH10CD1265' ORDER BY trip.gateIn DESC LIMIT 1; |
The task is to retrieve the latest material type code and DI number for vehicle JH09AR8268. | What is the material type code and DI number for the latest trip of vehicle JH09AR8268? | SELECT trip.materialType_code, consignmentdetailob.diNumber FROM transactionalplms.trip JOIN transactionalplms.consignmentdetailob ON trip.id = consignmentdetailob.id WHERE trip.vehicleNumber = 'JH09AR8268' ORDER BY trip.gateIn DESC LIMIT 1; |
The task is to find the latest Gate-Out time, driver ID, and vehicle number for vehicles in the GATE-OUT stage. | What is the latest Gate-Out time, driver ID, and vehicle number in the GATE-OUT stage? | SELECT gateOut, driverId, vehicleNumber FROM transactionalplms.trip WHERE mapPlantStageLocation = 'GATE-OUT' ORDER BY gateOut DESC LIMIT 1; |
The task is to find the trip ID, driver ID, and company code for the latest trip of vehicle JH09AR8268. | What is the latest trip ID, driver ID, and company code for vehicle JH09AR8268? | SELECT tripId, driverId, companyCode FROM transactionalplms.trip WHERE vehicleNumber = 'JH09AR8268' ORDER BY gateIn DESC LIMIT 1; |
The task is to find the Gate-Out time and driver ID for vehicle JH09AR8268 with status 'C'. | What is the Gate-Out time and driver ID for vehicle JH09AR8268 with status 'C'? | SELECT gateOut, driverId FROM transactionalplms.trip WHERE vehicleNumber = 'JH09AR8268' AND status = 'C' LIMIT 1; |
The task is to retrieve the latest Packing-In time and DI number for vehicle JH11AG0663. | What is the latest Packing-In time and DI number for vehicle JH11AG0663? | SELECT trip.packingIn, consignmentdetailob.diNumber FROM transactionalplms.trip JOIN transactionalplms.consignmentdetailob ON trip.id = consignmentdetailob.id WHERE trip.vehicleNumber = 'JH11AG0663' ORDER BY trip.packingIn DESC LIMIT 1; |
The task is to retrieve the latest plant stage, driver ID, and company code for vehicle JH11AG0663. | What is the latest plant stage, driver ID, and company code for vehicle JH11AG0663? | SELECT mapPlantStageLocation, driverId, companyCode FROM transactionalplms.trip WHERE vehicleNumber = 'JH11AG0663' ORDER BY gateIn DESC LIMIT 1; |
The task is to retrieve the Gate-In and Gate-Out times along with the DI number for vehicle UP32AA1010. | What are the latest Gate-In, Gate-Out times, and DI number for vehicle UP32AA1010? | SELECT trip.gateIn, trip.gateOut, consignmentdetailob.diNumber FROM transactionalplms.trip JOIN consignmentdetailob ON trip.id=consignmentdetailob.id WHERE trip.vehicleNumber = 'UP32AA1010' ORDER BY trip.gateIn DESC LIMIT 1; |
The task is to check if vehicle JH09AR8268 is in the YARD-IN stage. | Is vehicle JH09AR8268 currently in the YARD-IN stage? | SELECT mapPlantStageLocation, yardIn FROM transactionalplms.trip WHERE vehicleNumber = 'JH09AR8268' AND mapPlantStageLocation = 'YARD-IN' LIMIT 1; |
The task is to count the number of trips made today. | How many trips have been made today? | SELECT COUNT(*) AS trip_count FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE; |
The task is to retrieve the latest plant stage and DI number for vehicle JH10CK5574. | What is the latest plant stage and DI number for vehicle JH10CK5574? | SELECT trip.mapPlantStageLocation, consignmentdetailob.diNumber FROM transactionalplms.trip JOIN consignmentdetailob ON trip.id=consignmentdetailob.id WHERE trip.vehicleNumber = 'JH10CK5574' ORDER BY trip.gateIn DESC LIMIT 1; |
The task is to retrieve the Tare Weight and TW for vehicle MH34BG1735. | What is the Tare Weight and TW for the latest trip of vehicle MH34BG1735? | SELECT tareWeight, tw FROM transactionalplms.trip WHERE vehicleNumber = 'MH34BG1735' ORDER BY packingOut DESC LIMIT 1; |
The task is to calculate the time taken and find the driver ID for vehicle JH10AU7406. | How much time was taken and who is the driver for the latest trip of vehicle JH10AU7406? | SELECT timestampdiff(MINUTE, gateIn, gateOut) AS time_taken, driverId FROM transactionalplms.trip WHERE vehicleNumber = 'JH10AU7406' ORDER BY gateIn DESC LIMIT 1; |
The task is to count the number of unique stages completed by vehicle UP53ET7162. | How many stages has vehicle UP53ET7162 completed? | SELECT COUNT(DISTINCT mapPlantStageLocation) AS stages_completed FROM transactionalplms.trip WHERE vehicleNumber = 'UP53ET7162'; |
The task is to retrieve the material type for material code COMP. | What material does the material type code COMP represent? | SELECT materialType FROM transactionalplms.trip WHERE materialType_code = 'COMP'; |
The task is to retrieve material type, driver ID, and DI number for vehicle JH02P2241. | What is the material type, driver ID, and DI number for the latest trip of vehicle JH02P2241? | SELECT trip.materialType_code, trip.driverId, consignmentdetailob.diNumber FROM transactionalplms.trip JOIN consignmentdetailob ON trip.id=consignmentdetailob.id WHERE trip.vehicleNumber = 'JH02P2241' ORDER BY gateIn DESC LIMIT 1; |
The task is to count the number of vehicles currently at N205 for company IN10. | How many vehicles from company IN10 are currently at N205? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE mapPlantStageLocation = 'N205' AND companyCode='IN10'; |
The task is to count vehicles in the GATE-OUT stage between two timestamps. | How many vehicles exited the plant between 15:55:21 and 17:07:38 on 2024-04-21? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE mapPlantStageLocation = 'GATE-OUT' AND gateOut BETWEEN '2024-04-21 15:55:21' AND '2024-04-21 17:07:38'; |
The task is to calculate average time taken for Yard-IN and Packing stages. | What is the average time taken for Yard-IN and Packing stages? | SELECT AVG(TIMESTAMPDIFF(MINUTE, yardIn, yardOut)) AS avg_yard_time, AVG(TIMESTAMPDIFF(MINUTE, packingIn, packingOut)) AS avg_packing_time FROM transactionalplms.trip WHERE mapPlantStageLocation = 'YARD-IN'; |
The task is to retrieve the Tare Weight and DI number for vehicle MH33T4122. | What is the Tare Weight and DI number for the latest trip of vehicle MH33T4122? | SELECT trip.tareWeight, consignmentdetailob.diNumber FROM transactionalplms.trip JOIN consignmentdetailob ON trip.id=consignmentdetailob.id WHERE trip.vehicleNumber='MH33T4122' ORDER BY gateIn DESC LIMIT 1; |
The task is to count aborted and completed trips for today. | How many trips were aborted and completed today? | SELECT COUNT() AS aborted_count, COUNT() AS completed_trip FROM transactionalplms.trip WHERE status = 'A' OR status = 'C' AND DATE(gateIn) = CURRENT_DATE; |
The task is to retrieve the vehicle number, driver ID, and stage for a specific trip ID. | What is the vehicle number, driver ID, and stage for trip ID 20240418174953893? | SELECT vehicleNumber, driverId, mapPlantStageLocation FROM transactionalplms.trip WHERE tripId = '20240418174953893'; |
The task is to count the stages covered, retrieve the driver ID, and DI number for vehicle MH02ER9382. | How many stages were covered, and what are the driver ID and DI number for vehicle MH02ER9382? | SELECT COUNT(DISTINCT trip.mapPlantStageLocation) AS stages_covered, trip.driverId, consignmentdetailob.diNumber FROM transactionalplms.trip JOIN consignmentdetailob ON trip.id = consignmentdetailob.id WHERE trip.vehicleNumber = 'MH02ER9382' GROUP BY trip.driverId, consignmentdetailob.diNumber ORDER BY MAX(trip.gateIn) DESC LIMIT 1; |
The task is to retrieve the sequence number and driver ID for vehicle jh10cr1855. | What is the sequence number and driver ID for vehicle jh10cr1855? | SELECT sequence_number, driverId FROM transactionalplms.trip WHERE vehicleNumber = 'jh10cr1855' ORDER BY gateIn DESC LIMIT 1; |
The task is to calculate the average time taken between Packing-In and Packing-Out stages. | What is the average time taken between Packing-In and Packing-Out? | SELECT AVG(TIMESTAMPDIFF(MINUTE, packingIn, packingOut)) AS avg_packing_time from transactionalplms.trip. |
The task is to calculate trips with status completed | How many trips with status 'C' are in plant N205? | SELECT COUNT(*) AS trip_count FROM transactionalplms.trip WHERE status = 'C' AND plantCode='N205'; |
The task is to count vehicles handling material type PSC today in plant N205. | How many vehicles are handling PSC material type today in plant N205? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE materialType_code = 'PSC' AND DATE(gateIn) = CURRENT_DATE AND plantCode='N205'; |
The task is to retrieve the trip ID and driver ID for trip ID 559. | What is the trip ID and driver ID for ID 559? | SELECT tripId, driverId FROM transactionalplms.trip WHERE id = '559'; |
The task is to count vehicles associated with company IN20 in plant N205. | How many vehicles are associated with company IN20 in plant N205? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE companyCode = 'IN20' AND plantCode='N205'; |
The task is to count vehicles handling materials COMP or PPC. | How many vehicles are handling materials COMP or PPC? | SELECT COUNT(DISTINCT vehicleNumber) AS vehicle_count FROM transactionalplms.trip WHERE materialType IN ('COMP', 'PPC'); |
The task is to find the vehicle that took the maximum time from gate-in to gate-out today. | Which vehicle took the maximum time from gate-in to gate-out today? | SELECT vehicleNumber, TIMESTAMPDIFF(MINUTE, gateIn, gateOut) AS time_taken, driverId FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE ORDER BY time_taken DESC LIMIT 1; |
The task is to find the vehicle stages completed for ID 1005. | Which vehicle completed stages and how many for ID 1005? | SELECT vehicleNumber, COUNT(DISTINCT mapPlantStageLocation) AS stages_completed FROM transactionalplms.trip WHERE id = '1005'; |
The task is to find the current stage and driver ID of vehicle MH04DS5386. | Where is MH04DS5386 right now, and who is the driver? | SELECT mapPlantStageLocation, driverId FROM transactionalplms.trip WHERE vehicleNumber = 'MH04DS5386' ORDER BY gateIn DESC LIMIT 1; |
The task is to find the vehicle that spent the least time in the plant today. | Which vehicle spent the least time in the plant 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 find the total goods weight handled by IN10 within a specific time period. | What is the total goods weight handled by IN10 between 2024-04-18 17:27:26 and 2024-04-20 12:10:35? | SELECT sum(tw) AS goods_weight FROM transactionalplms.trip WHERE companyCode = 'IN10' AND gateIn BETWEEN '2024-04-18 17:27:26' AND '2024-04-20 12:10:35'; |
The task is to count vehicles that entered the plant today by 3 PM. | How many vehicles entered the plant by 3 PM today? | 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 that spent the most time in the plant today. | Which vehicle spent the most time in the plant today? | SELECT vehicleNumber, driverId, tw, 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 vehicles in each stage today. | What is the total count of vehicles in each stage today? | SELECT mapPlantStageLocation, COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE GROUP BY mapPlantStageLocation; |
The task is to count vehicles currently in the Packing-Out stage. | How many vehicles are in the Packing-Out stage? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE mapPlantStageLocation = 'Packing-Out' AND DATE(gateIn) = CURRENT_DATE; |
The task is to count vehicles in Yard-Out and Gate-Out stages today. | How many vehicles are in the Yard-Out and Gate-Out stages today? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE mapPlantStageLocation IN ('Yard-Out', 'Gate-Out') AND DATE(gateIn) = CURRENT_DATE avg_packing_time FROM transactionalplms.trip WHERE packingIn IS NOT NULL AND packingOut IS NOT NULL; |
The task is to calculate the total vehicles, count of vehicles with status 'C,' and their ratio to the total. | What is the total number of vehicles, those with status 'C,' and their ratio? | SELECT COUNT() AS total_vehicles, SUM(CASE WHEN status = 'c' THEN 1 ELSE 0 END) AS vehicle_count_c, ROUND(SUM(CASE WHEN status = 'c' THEN 1 ELSE 0 END) * 1.0 / COUNT(), 2) AS ratio_c_to_total FROM transactionalplms.trip; |
The task is to count distinct stages completed for a given trip ID 764. | How many distinct stages were completed for trip ID 764? | SELECT COUNT(DISTINCT mapPlantStageLocation) AS stages_completed, mapPlantStageLocation FROM transactionalplms.trip WHERE id = '764'; |
The task is to count completed trips in the Packing-In stage. | How many completed trips are in the Packing-In stage? | SELECT COUNT(*) AS completed_count FROM transactionalplms.trip WHERE mapPlantStageLocation = 'packingIn' AND packingIn IS NOT NULL; |
The task is to count completed trips in the Packing-In stage for the current date. | How many trips have completed the Packing-In stage today? | SELECT COUNT(*) AS completed_count FROM transactionalplms.trip WHERE mapPlantStageLocation = 'Packing-In' AND packingIn IS NOT NULL AND DATE(packingIn) = CURRENT_DATE; |
The task is to get the Yard-In time, driver ID, and DI number for a specific vehicle. | What is the Yard-In time, driver ID, and DI number for vehicle MH40CD7766? | SELECT trip.yardIn, trip.driverId, consignmentdetailob.diNumber FROM transactionalplms.trip JOIN consignmentdetailob ON trip.id = consignmentdetailob.id WHERE trip.vehicleNumber = 'MH40CD7766'; |
The task is to count vehicles that have 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 active vehicles currently in the plant at a specific location. | How many vehicles are active in plant code N205? | SELECT COUNT(*) AS active_vehicle_count FROM transactionalplms.trip WHERE gateOut IS NULL AND plantCode = 'N205'; |
The task is to find the first vehicle that entered the plant today. | Which vehicle entered the plant first today? | SELECT vehicleNumber, driverId FROM transactionalplms.trip WHERE gateIn = CURRENT_DATE ORDER BY gateIn ASC LIMIT 1; |
The task is to check if a specific vehicle has completed the Gate-Out stage today. | Has vehicle BR23A2793 successfully completed the Gate-Out stage today? | SELECT CASE WHEN COUNT(*) > 0 THEN 'Yes' ELSE 'No' END AS gate_out_completed FROM transactionalplms.trip WHERE vehicleNumber = 'BR23A2793' AND mapPlantStageLocation = 'gateOut' AND DATE(gateOut) = CURRENT_DATE AND gateOut IS NOT NULL; |
The task is to count the vehicles from the previous week. | How many vehicles were there in the plant last week? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE WEEK(gateIn) = WEEK(CURRENT_DATE) - 1 AND plantCode = 'N205'; |
The task is to find the date with the maximum number of vehicles, unique vehicles, and their processing time. | On which date was the maximum number of vehicles present in the plant? | SELECT DATE(gateIn) AS date, COUNT(*) AS vehicle_count, COUNT(DISTINCT vehicleNumber) AS unique_vehicles, SUM(CASE WHEN mapPlantStageLocation = 'Packing-In' THEN 1 ELSE 0 END) AS packing_in_count, SUM(CASE WHEN mapPlantStageLocation = 'Gate-Out' THEN 1 ELSE 0 END) AS gate_out_count, ROUND(AVG(TIMESTAMPDIFF(MINUTE, gateIn, gateOut)), 2) AS avg_processing_time_minutes FROM transactionalplms.trip WHERE gateIn IS NOT NULL GROUP BY DATE(gateIn) ORDER BY vehicle_count DESC, avg_processing_time_minutes ASC LIMIT 1; |
The task is to count trips completed by a specific company today. | How many trips were completed today by vehicles from company IN20? | SELECT COUNT(*) AS trips_count FROM transactionalplms.trip WHERE companyCode = 'IN20' AND DATE(gateIn) = CURRENT_DATE; |
The task is to find distinct vehicle numbers that entered and exited the yard today. | Which vehicles entered and exited the yard today? | SELECT DISTINCT vehicleNumber FROM transactionalplms.trip WHERE yardIn = CURRENT_DATE AND yardOut = CURRENT_DATE; |
The task is to count vehicles that entered and exited the yard today. | How many vehicles entered and exited the yard today? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE yardIn = CURRENT_DATE AND yardOut = CURRENT_DATE; |
The task is to count and group vehicles by their number that entered and exited the yard today. | Provide the vehicle numbers and counts for vehicles that entered and exited the yard today. | SELECT DISTINCT vehicleNumber, COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE yardIn = CURRENT_DATE AND yardOut = CURRENT_DATE GROUP BY vehicleNumber; |
The task is to count the trips with trip creation type 'S' and status 'C'. | How many trips have trip creation type 'S' with status 'C'? | SELECT COUNT(*) AS trip_count FROM transactionalplms.trip WHERE tripCreationType = 'S' AND status = 'C'; |
The task is to find vehicles that have completed Packing-Out but have not yet exited the plant today. | Which vehicles have completed Packing-Out but not Gate-Out today? | SELECT vehicleNumber FROM transactionalplms.trip WHERE packingOut IS NOT NULL AND gateOut IS NULL AND DATE(gateIn) = CURRENT_DATE; |
The task is to find vehicles that entered the plant before 9 AM today. | Which vehicles entered the plant before 9 AM today? | SELECT vehicleNumber FROM transactionalplms.trip WHERE TIME(gateIn) < '09:00:00' AND DATE(gateIn) = CURRENT_DATE; |
The task is to count vehicles with status 'A' that entered the plant today. | How many vehicles with status 'A' entered the plant today? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE status = 'A' AND DATE(gateIn) = CURRENT_DATE; |
The task is to find the vehicle that spent the most time in the yard today. | Which vehicle spent the most time in the yard today? | SELECT vehicleNumber, TIMESTAMPDIFF(MINUTE, yardIn, yardOut) AS time_spent FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE ORDER BY time_spent DESC LIMIT 1; |
The task is to count trips completed today for material type 'COMP' with status 'C’. | How many 'COMP' trips with status 'C' were completed today? | SELECT COUNT(*) AS trips_completed FROM transactionalplms.trip WHERE materialType_code = 'COMP' AND status = 'C' AND DATE(gateIn) = CURRENT_DATE; |
The task is to count vehicles currently active in the plant today. | How many vehicles are still active in the plant today? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE AND gateOut IS NULL; |
The task is to calculate the percentage of active vehicles today compared to total entries. | What percentage of vehicles are still active in the plant today? | SELECT (COUNT() * 100 / (SELECT COUNT() FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE)) AS active_percentage FROM transactionalplms.trip WHERE gateOut IS NULL AND DATE(gateIn) = CURRENT_DATE; |
The task is to count completed trips for the current month. | How many trips with status 'C' were completed this month? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE status = 'C' AND MONTH(gateIn) = MONTH(CURRENT_DATE); |
The task is to find trip counts for each vehicle with status 'C' for the current month. | How many trips with status 'C' did each vehicle complete this month? | SELECT vehicleNumber, COUNT(*) AS trip_count FROM transactionalplms.trip WHERE status = 'C' AND MONTH(gateIn) = MONTH(CURRENT_DATE) AND YEAR(gateIn) = YEAR(CURRENT_DATE) GROUP BY vehicleNumber; |
The task is to find vehicles carrying 'PPC' material type that have not exited the plant yet. | Which vehicles carrying 'PPC' are still in the plant? | SELECT vehicleNumber FROM transactionalplms.trip WHERE materialType_code = 'PPC' AND gateOut IS NULL; |
The task is to find the vehicle with the highest number of trips in total. | Which vehicle has the highest number of trips? | SELECT vehicleNumber, COUNT(*) AS trip_count FROM transactionalplms.trip GROUP BY vehicleNumber ORDER BY trip_count DESC LIMIT 1; |
The task is to find vehicles that entered the plant multiple times today. | Which vehicles entered the plant multiple times today? | SELECT vehicleNumber FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE GROUP BY vehicleNumber HAVING COUNT(*) > 1; |
The task is to count vehicles that exited the yard but not the plant today. | How many vehicles exited the yard but have not exited the plant today? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE DATE(yardOut) = CURRENT_DATE AND gateOut IS NULL; |
The task is to find the first vehicle that exited the plant today. | Which vehicle exited the plant first today? | SELECT vehicleNumber FROM transactionalplms.trip WHERE DATE(gateOut) = CURRENT_DATE ORDER BY gateOut ASC LIMIT 1; |
The task is to find vehicles with missing yard entry but recorded yard exit. | Which vehicles have missing Yard-In but recorded Yard-Out? | SELECT vehicleNumber FROM transactionalplms.trip WHERE yardIn IS NULL AND yardOut IS NOT NULL; |
The task is to calculate the average time spent from Yard-In to Gate-Out for completed stages. | What is the average time spent from Yard-In to Gate-Out for completed trips? | SELECT AVG(TIMESTAMPDIFF(MINUTE, yardIn, gateOut)) AS avg_time FROM transactionalplms.trip WHERE yardIn IS NOT NULL AND gateOut IS NOT NULL; |
The task is to find the vehicle that spent the least time in the plant today. | Which vehicle spent the least time in the plant today? | SELECT vehicleNumber, TIMESTAMPDIFF(MINUTE, gateIn, gateOut) AS time_spent FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE AND gateOut IS NOT NULL ORDER BY time_spent ASC LIMIT 1; |
The task is to list all distinct material types for vehicles currently in the plant. | What are the distinct material types for vehicles still in the plant? | SELECT DISTINCT materialType_code FROM transactionalplms.trip WHERE gateOut IS NULL; |
The task is to check if the vehicle has completed Yard-In stage. | Has the vehicle 'JH10CS206' completed Yard-In stage? | SELECT CASE WHEN COUNT(*) > 0 THEN 'Yes' ELSE 'No' END AS yard_in_completed FROM transactionalplms.trip WHERE vehicleNumber = 'JH10CS206' AND mapPlantStageLocation = 'yardIn'; |
The task is to count trips that entered the plant today. | How many trips entered the plant today? | SELECT COUNT(*) AS trip_count FROM transactionalplms.trip WHERE DATE(gateIn) = CURRENT_DATE; |
The task is to find the current plant stage of a specific vehicle. | What is the current stage of vehicle 'JH10CS206'? | SELECT mapPlantStageLocation AS current_stage FROM transactionalplms.trip WHERE vehicleNumber = 'JH10CS206' ORDER BY gateIn DESC LIMIT 1; |
The task is to find the tare weight of a specific vehicle that entered the plant today. | What is the tare weight of vehicle 'MH34BG1275' that entered the plant today? | SELECT vehicleNumber, tareWeight FROM transactionalplms.trip WHERE vehicleNumber = 'MH34BG1275' AND DATE(gateIn) = CURRENT_DATE; |
The task is to calculate the time spent by a specific vehicle in the plant. | How much time did vehicle 'TS01UC241' spend in the plant? | SELECT vehicleNumber, TIMESTAMPDIFF(MINUTE, gateIn, gateOut) AS time_spent FROM transactionalplms.trip WHERE vehicleNumber = 'TS01UC241'; |
The task is to find the number of distinct plant stages completed by a specific vehicle. | How many distinct stages has vehicle 'UP53ET7162' completed? | SELECT vehicleNumber, COUNT(DISTINCT mapPlantStageLocation) AS stages_completed FROM transactionalplms.trip WHERE vehicleNumber = 'UP53ET7162'; |
The task is to identify the material corresponding to the code 'COMP'. | Which material has the code 'COMP'? | SELECT materialType FROM transactionalplms.trip WHERE materialType_code = 'COMP'; |
The task is to identify the material type carried by a specific vehicle. | What material type is the vehicle 'JH02P2241' carrying? | SELECT trip.materialType_code, consignmentdetailob.diNumber FROM transactionalplms.trip JOIN consignmentdetailob ON trip.id = consignmentdetailob.id WHERE trip.vehicleNumber = 'JH02P2241' ORDER BY gateIn DESC LIMIT 1; |
The task is to count the number of vehicles currently at location N205. | How many vehicles are currently at N205? | SELECT COUNT(*) AS vehicle_count FROM transactionalplms.trip WHERE mapPlantStageLocation = 'N205'; |
The task is to count the number of vehicles 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 Yard-In stage. | How much time on average does a vehicle take in Yard-In? | SELECT AVG(TIMESTAMPDIFF(MINUTE, yardIn, yardOut)) AS avg_yard_time FROM transactionalplms.trip WHERE mapPlantStageLocation = 'YARD-IN'; |
The task is to find the tare weight, time, and date for specific vehicles. | What is the tare weight, time, and date for vehicles 'JH10CD0283' and 'MH33T4122'? | SELECT vehicleNumber, tareWeight, DATE(gateIn) AS date, TIME(gateIn) AS time FROM transactionalplms.trip WHERE vehicleNumber IN ('JH10CD0283', 'MH33T4122'); |
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 related to a specific trip ID. | What is the vehicle number related to trip ID '2024042514482296'? | SELECT vehicleNumber FROM transactionalplms.trip WHERE tripId = '2024042514482296'; |
The task is to find the number of stages covered by a specific vehicle. | How many stages have been covered by the vehicle 'MH02ER9382'? | SELECT COUNT(DISTINCT mapPlantStageLocation) AS stages_covered FROM transactionalplms.trip WHERE vehicleNumber = 'MH02ER9382'; |
The task is to find the sequence number for a specific vehicle. | In which sequence number is the 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 taken between Packing-In and Packing-Out stages. | 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 the number of trips created with 'S' type and completed with 'C' status. | How many vehicles have trip creation type 'S' with 'C' status? | SELECT COUNT(*) AS trip_count FROM transactionalplms.trip WHERE tripCreationType = 'S' AND status = 'C'; |
The task is to check if a vehicle is carrying a specific material and, if not, identify the vehicle carrying it. | Is vehicle 'BR23AZ793' carrying the material type '000000148000010009'? If not, which vehicle is carrying it? | SELECT vehicleNumber FROM transactionalplms.trip WHERE materialType_code = '000000148000010009'; |
The task is to count the trips completed without any issues. | How many trips have been done by vehicles without any issues? | SELECT COUNT(*) AS completed_trips FROM transactionalplms.trip WHERE status = 'C'; |
The task is to find the number of vehicles carrying the material PSC today. | How many vehicles have the 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 vehicle number for a given IGP number. | What is the vehicle number for IGP number '2370051830'? | SELECT vehicleNumber FROM transactionalplms.trip WHERE igpNumber = '2370051830'; |
End of preview. Expand
in Data Studio
No dataset card yet
- Downloads last month
- 1