sql
stringclasses
5 values
question
stringclasses
5 values
schema
stringclasses
5 values
translation
stringclasses
5 values
SELECT supplier_name, SUM(total_value) as total_value_supplied FROM Suppliers WHERE year = 2020 GROUP BY supplier_name ORDER BY total_value_supplied DESC LIMIT 5;
What are the top 5 suppliers by total value of parts supplied for aircraft manufacturing in 2020?
CREATE TABLE Suppliers (supplier_id INT, supplier_name VARCHAR(50), parts_supplied INT, total_value DECIMAL(10, 2), year INT); INSERT INTO Suppliers (supplier_id, supplier_name, parts_supplied, total_value, year) VALUES (1, 'Supplier-A', 500, 5000000, 2020), (2, 'Supplier-B', 300, 3500000, 2020), (3, 'Supplier-C', 800, 7000000, 2020), (4, 'Supplier-D', 250, 2200000, 2020);
ما هي أفضل 5 موردين من حيث قيمة الأجزاء المقدمة لصناعة الطائرات في عام 2020؟
SELECT COUNT(*) FROM aircraft WHERE manufacturer = 'XYZ';
Count the number of aircraft produced by company XYZ
CREATE TABLE aircraft (id INT, model VARCHAR(50), manufacturer VARCHAR(50), production_year INT);
عداد عدد الطائرات التي أنتجتها شركة XYZ
SELECT AVG(cost) FROM NavalVessels WHERE EXTRACT(QUARTER FROM maintenance_date) = 1 AND EXTRACT(YEAR FROM maintenance_date) = 2021 AND status = 'Maintenance';
Get the average monthly maintenance cost of naval vessels in Q1 2021
CREATE TABLE NavalVessels (id INT, name VARCHAR(50), status VARCHAR(50), cost FLOAT, maintenance_date DATE); INSERT INTO NavalVessels (id, name, status, cost, maintenance_date) VALUES (1, 'USS Zumwalt', 'Maintenance', 150000, '2021-01-15');
الحصول على متوسط التكلفة الشهرية للصيانة للسفن البحرية في الربع الأول من عام 2021
SELECT COUNT(*) FROM marine_species WHERE location = 'Atlantic Ocean';
How many marine species are found in the Atlantic Ocean?
CREATE TABLE marine_species (name VARCHAR(50), common_name VARCHAR(50), location VARCHAR(50));
كم عدد الأنواع البحرية التي توجد في المحيط الأطلسي؟
SELECT b.name FROM Building b JOIN GreenRoof gr ON b.id = gr.building_id JOIN SolarPanel sp ON b.id = sp.building_id WHERE b.country = 'UK';
Which buildings in the UK have both a green roof and solar panels installed?
CREATE TABLE Building (id INT, name VARCHAR(50), city VARCHAR(50), country VARCHAR(50), sqft INT, PRIMARY KEY (id)); INSERT INTO Building (id, name, city, country, sqft) VALUES (5, 'Big Ben', 'London', 'UK', 215000); INSERT INTO Building (id, name, city, country, sqft) VALUES (6, 'Tower Bridge', 'London', 'UK', 453208); CREATE TABLE GreenRoof (id INT, building_id INT, planted_date DATE, size INT, PRIMARY KEY (id), FOREIGN KEY (building_id) REFERENCES Building (id)); INSERT INTO GreenRoof (id, building_id, planted_date, size) VALUES (5, 5, '2012-04-01', 25000); INSERT INTO GreenRoof (id, building_id, planted_date, size) VALUES (6, 6, '2016-01-01', 30000); CREATE TABLE SolarPanel (id INT, building_id INT, installed_date DATE, size INT, PRIMARY KEY (id), FOREIGN KEY (building_id) REFERENCES Building (id)); INSERT INTO SolarPanel (id, building_id, installed_date, size) VALUES (5, 5, '2013-06-01', 40000); INSERT INTO SolarPanel (id, building_id, installed_date, size) VALUES (6, 6, '2017-08-01', 50000);
أي المباني في المملكة المتحدة لديها سقف أخضر ولوحات شمسية مثبتة؟