LLama_Fine_tuning_csv / llama_fine_tuning_utf8.csv
japat123's picture
Upload llama_fine_tuning_utf8.csv
d61a3bc verified
instruction,input,output
The task is to determine the order details of pizzas sold on '2015-01-01' .,"How many pizzas of each type were sold on ""2015-01-01"" ?","SELECT order_details$.pizza_id, COUNT(order_details$.pizza_id) FROM order_details$ , orders$
WHERE orders$.order_id=order_details$.order_id
AND orders$.order_date='2015-01-01'
GROUP BY order_details$.pizza_id
ORDER BY COUNT(order_details$.pizza_id) DESC"
The task is to determine the number of pizzas were sold daily .,How many pizzas were sold daily ?,"SELECT CONVERT(date,orders$.order_date) , COUNT(order_details$.order_details_id*order_details$.quantity)
FROM order_details$ ,orders$
WHERE order_details$.order_id=orders$.order_id
GROUP BY CONVERT(date,orders$.order_date)
ORDER BY CONVERT(date,orders$.order_date)"
The task is to determine the number of pizzas sold monthly .,How many pizzas were sold monthly ?,"SELECT month(CONVERT(date,orders$.order_date)) , COUNT(order_details$.order_details_id*order_details$.quantity)
FROM order_details$ ,orders$
WHERE order_details$.order_id=orders$.order_id
GROUP BY month(CONVERT(date,orders$.order_date))
ORDER BY month(CONVERT(date,orders$.order_date))"
The task is to determine the number of orders placed daily .,How many orders were there daily ?,"SELECT CONVERT(date,order_date) , COUNT(order_id)
FROM orders$
GROUP BY CONVERT(date,order_date)
ORDER BY CONVERT(date,order_date)"
The task is to determine the number of orders monthly .,How many orders were there monthly ?,"SELECT DATENAME(MONTH, order_date) ,COUNT(*)
FROM orders$
GROUP BY DATENAME(MONTH, order_date), MONTH(order_date)
ORDER BY MONTH(order_date)"
The task is to determine the number of pizzas of each type sold daily .,How many many pizzas of each type were sold ?,"SELECT pizza_id , COUNT(pizza_id)
FROM order_details$
GROUP BY pizza_id "
The task is to determine the number of pizzas of each type sold monthly .,How many pizzas of each type were sold every month ?,"SELECT DATENAME(month,o.order_date) AS Order_month, od.pizza_id , COUNT(od.pizza_id) AS Num_pizzas
FROM order_details$ AS od, orders$ AS o
WHERE od.order_id=o.order_id
GROUP BY od.pizza_id ,DATENAME(month,o.order_date),MONTH(CONVERT(date,o.order_date))
ORDER BY MONTH(CONVERT(date,o.order_date)) , COUNT(od.pizza_id) DESC"
The task is to determine the order details for order id 27 .,what are the order details for pizza of order_id 27 ?,"SELECT
pt.pizza_name,
p.order_size,
od.quantity
FROM order_details$ AS od
JOIN pizzas$ p ON od.pizza_id = p.pizza_id
JOIN pizza_types$ pt ON p.pizza_type_id = pt.pizza_type_id
WHERE od.order_id = 27;"
The task is to determine the most sold pizza each month .,which pizza was ordered the most each month ?,"with table1 AS
(
SELECT
DATENAME(month,o.order_date) AS Order_month,
MONTH(CONVERT(date,o.order_date)) AS Month_num ,
od.pizza_id ,
COUNT(od.pizza_id) AS Num_pizzas ,
ROW_NUMBER() over (partition by DATENAME(month,o.order_date) ORDER BY MONTH(CONVERT(date,o.order_date)) , COUNT(od.pizza_id) DESC) AS row_num
FROM order_details$ AS od, orders$ AS o
WHERE od.order_id=o.order_id
GROUP BY od.pizza_id ,DATENAME(month,o.order_date),MONTH(CONVERT(date,o.order_date))
)
SELECT Order_month , pizza_id , Num_pizzas
FROM table1
WHERE row_num=1
ORDER BY Month_num"
The task is to determine the number of average orders per month .,How many orders were there on average each month ?,"SELECT cast((max(order_id)/12)AS int)
FROM orders$"
the task is to determine the number of average orders per day .,How many orders were there on average each day ?,"SELECT cast((MAX(order_id)/COUNT(distinct order_date)) AS int)
FROM orders$"
The task is to determine the day on which most pizzas were sold .,Which day were the most pizzas sold ?,"SELECT TOP 1 CONVERT(date,orders$.order_date) , COUNT(order_details$.order_details_id*order_details$.quantity)
FROM order_details$ ,orders$
WHERE order_details$.order_id=orders$.order_id
GROUP BY CONVERT(date,orders$.order_date)
ORDER BY COUNT(order_details$.order_details_id*order_details$.quantity) DESC"
The task is to determine the month in which most pizzas were sold .,Which month were the most pizzas sold ?,"SELECT TOP 1 DATENAME(MONTH, order_date) ,COUNT(*)
FROM orders$
GROUP BY DATENAME(MONTH, order_date), MONTH(order_date)
ORDER BY COUNT(*) DESC"
"The task is to determine the day with the highest revenue ,",Which day had the highest revenue ?,"SELECT TOP 1 CONVERT(date,o.order_date) , sum(od.quantity*p.order_price)
FROM order_details$ AS od
JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id
JOIN orders$ AS o
ON o.order_id = od.order_id
GROUP BY CONVERT(date,o.order_date)
ORDER BY sum(od.quantity*p.order_price) DESC"
The task is to determine the month with the highest revenue .,Which month had the highest revenue ?,"SELECT TOP 1 DATENAME(MONTH,o.order_date) AS Month_Name , sum(od.quantity*p.order_price) AS Revenue
FROM order_details$ AS od
JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id
JOIN orders$ AS o
ON o.order_id = od.order_id
GROUP BY DATENAME(MONTH,o.order_date) , MONTH(o.order_date)
ORDER BY sum(od.quantity*p.order_price) DESC "
The task is to determine the total revenue each day .,What was the total revenue each day ?,"SELECT CONVERT(date,o.order_date) , sum(od.quantity*p.order_price)
FROM order_details$ AS od
JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id
JOIN orders$ AS o
ON o.order_id = od.order_id
GROUP BY CONVERT(date,o.order_date)
ORDER BY CONVERT(date,o.order_date) "
The task is to determine the total revenue each month .,What was the total revenue each month ?,"SELECT DATENAME(MONTH,o.order_date) , sum(od.quantity*p.order_price)
FROM order_details$ AS od
JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id
JOIN orders$ AS o
ON o.order_id = od.order_id
GROUP BY DATENAME(MONTH,o.order_date) , MONTH(o.order_date)
ORDER BY MONTH(o.order_date)"
The task is to determine the total revenue of the pizza place .,What was the total revenue of the pizza place?,"SELECT cast(sum(od.quantity*p.order_price) AS int)
FROM order_details$ AS od
full JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id"
The task is to determine how many pizzas were sold in each category .,Which pizza category has sold how many pizzas ?,"SELECT
pt.pizza_category ,
COUNT(pt.pizza_category) AS Number_of_pizzas
FROM order_details$ AS od
JOIN orders$ AS o
ON od.order_id=o.order_id
JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id
JOIN pizza_types$ AS pt
ON p.pizza_type_id=pt.pizza_type_id
GROUP BY pt.pizza_category"
The task is to determine the most sold pizza category in terms of sales .,Which pizza category is the most sold till now?,"SELECT TOP 1
pt.pizza_category ,
COUNT(pt.pizza_category) AS Number_of_pizzas
FROM order_details$ AS od
JOIN orders$ AS o
ON od.order_id=o.order_id
JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id
JOIN pizza_types$ AS pt
ON p.pizza_type_id=pt.pizza_type_id
GROUP BY pt.pizza_category
ORDER BY COUNT(pt.pizza_category) DESC"
The task is to determine the most sold pizza category in terms of sales each month .,Which pizza category is the most sold each month ?,"with table1 AS
(
SELECT
DATENAME(month,o.order_date) AS Order_month,
MONTH(CONVERT(date,o.order_date)) AS Month_num ,
pt.pizza_category ,
COUNT(pt.pizza_category) AS Num_pizzas ,
ROW_NUMBER() over (partitiON by DATENAME(month,o.order_date) ORDER BY MONTH(CONVERT(date,o.order_date)) , COUNT(pt.pizza_category) DESC) AS row_num
FROM orders$ AS o
JOIN order_details$ AS od
ON od.order_id=o.order_id
JOIN pizzas$ AS p
ON p.pizza_id=od.pizza_id
JOIN pizza_types$ AS pt
ON pt.pizza_type_id=p.pizza_type_id
GROUP BY pt.pizza_category ,DATENAME(month,o.order_date),MONTH(CONVERT(date,o.order_date))
)
SELECT Order_month , pizza_category , Num_pizzas
FROM table1
WHERE row_num=1
ORDER BY Month_num"
The task is to determine the month with the highest number of orders .,Which month had the highest number of orders ?,"SELECT TOP 1 DATENAME(month,CONVERT(date,order_date)) , COUNT(order_id)
FROM orders$
GROUP BY DATENAME(month,CONVERT(date,order_date))
ORDER BY COUNT(order_id) DESC"
The task is to determine the date with the highest number of orders .,Which day had the highest number of orders ?,"SELECT TOP 1 CONVERT(date,order_date) , COUNT(order_id)
FROM orders$
GROUP BY CONVERT(date,order_date)
ORDER BY COUNT(order_id) DESC"
The task is to determine the number of pizzas of each category sold everyday .,How much pizzas of each category were sold each day ?,"SELECT
CONVERT(date,o.order_date) AS Date_,
pt.pizza_category ,
COUNT(pt.pizza_category) AS Number_of_pizzas
FROM order_details$ AS od
JOIN orders$ AS o
ON od.order_id=o.order_id
JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id
JOIN pizza_types$ AS pt
ON p.pizza_type_id=pt.pizza_type_id
GROUP BY CONVERT(date,o.order_date) , pt.pizza_category
ORDER BY CONVERT(date,o.order_date)"
The task is to determine the number of pizzas of each category sold each month.,How much pizzas of each category were sold each month ?,"SELECT
DATENAME(MONTH,o.order_date) AS Month_name,
pt.pizza_category ,
COUNT(pt.pizza_category) AS Number_of_pizzas
FROM order_details$ AS od
JOIN orders$ AS o
ON od.order_id=o.order_id
JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id
JOIN pizza_types$ AS pt
ON p.pizza_type_id=pt.pizza_type_id
GROUP BY DATENAME(MONTH,o.order_date) , pt.pizza_category,MONTH(o.order_date)
ORDER BY MONTH(o.order_date)"
The task is to determine the number of orders placed each day .,How many orders were placed each day ?,"SELECT CONVERT(date,order_date) , COUNT(order_id)
FROM orders$
GROUP BY CONVERT(date,order_date)
ORDER BY CONVERT(date,order_date)"
The task is to determine the number of orders placed each month .,How many orders were placed each month ?,"SELECT DATENAME(month,CONVERT(date,order_date)) , COUNT(order_id)
FROM orders$
GROUP BY DATENAME(month,CONVERT(date,order_date)) , MONTH(order_date)
ORDER BY MONTH(order_date)"
The task is to determine the revenue corresponding to each order .,What is the revenue correponding to each order ?,"SELECT od.order_id , sum(od.quantity*p.order_price) AS revenue
FROM order_details$ AS od , pizzas$ AS p
WHERE od.pizza_id = p.pizza_id
GROUP BY od.order_id
ORDER BY od.order_id"
The task is to determine the top 5 months in terms of revenue .,Which 5 months had the most revenue ?,"SELECT TOP 5 DATENAME(MONTH,o.order_date) AS Month_Name , sum(od.quantity*p.order_price) AS Revenue
FROM order_details$ AS od
JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id
JOIN orders$ AS o
ON o.order_id = od.order_id
GROUP BY DATENAME(MONTH,o.order_date) , MONTH(o.order_date)
ORDER BY sum(od.quantity*p.order_price) DESC "
The task is to detemine the last 5 months in terms of revenue .,Which 5 months had the least revenue ?,"SELECT TOP 5 DATENAME(MONTH,o.order_date) AS Month_Name , sum(od.quantity*p.order_price) AS Revenue
FROM order_details$ AS od
JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id
JOIN orders$ AS o
ON o.order_id = od.order_id
GROUP BY DATENAME(MONTH,o.order_date) , MONTH(o.order_date)
ORDER BY sum(od.quantity*p.order_price) DESC "
The task is to determine the top 10 dates in terms of revenue .,Which 10 days had the most revenue ?,"SELECT TOP 10 CONVERT(date,o.order_date) AS Date , sum(od.quantity*p.order_price) AS Revenue
FROM order_details$ AS od
JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id
JOIN orders$ AS o
ON o.order_id = od.order_id
GROUP BY CONVERT(date,o.order_date)
ORDER BY sum(od.quantity*p.order_price) DESC"
The task is to determine the revenue corresponding to the pizza id .,What is the revenue corresponding to the pizza id ?,"SELECT od.pizza_id , sum(od.quantity*p.order_price) AS Revenue
FROM order_details$ AS od , pizzas$ AS p
WHERE od.pizza_id = p.pizza_id
GROUP BY od.pizza_id
ORDER BY od.pizza_id"
The task is to determine the pizza which brought the most revenue .,Which pizza brought the most revenue ?,"SELECT TOP 1 od.pizza_id , sum(od.quantity*p.order_price) AS Revenue
FROM order_details$ AS od , pizzas$ AS p
WHERE od.pizza_id = p.pizza_id
GROUP BY od.pizza_id
ORDER BY sum(od.quantity*p.order_price) DESC"
The task is to determine the 5 pizzas which brought the most revenue .,Which 5 pizzas brought the most revenue ?,"SELECT TOP 5 od.pizza_id , sum(od.quantity*p.order_price) AS Revenue
FROM order_details$ AS od , pizzas$ AS p
WHERE od.pizza_id = p.pizza_id
GROUP BY od.pizza_id
ORDER BY sum(od.quantity*p.order_price) DESC"
The task is to determine the 5 pizza which were sold the highest .,Which 5 pizzas were sold the highest ?,"SELECT TOP 5 od.pizza_id , sum(od.quantity) AS pizzas_sold
FROM order_details$ AS od , pizzas$ AS p
WHERE od.pizza_id = p.pizza_id
GROUP BY od.pizza_id
ORDER BY sum(od.quantity*p.order_price) DESC"
The task is to determine the average order revenue,What is the average order revenue ?,"SELECT (sum(od.quantity*p.order_price)/MAX(order_id)) AS Average_order_revenue
FROM order_details$ AS od , pizzas$ AS p
WHERE od.pizza_id= p.pizza_id"
The task is to determine the pizza which was sold the least .,Which is the least favourable pizza by sales quantity ?,"SELECT TOP 1 pizza_id , sum(quantity) AS Orders
FROM order_details$
GROUP BY pizza_id
ORDER BY sum(quantity) "
The task is to determine the pizza which brought the least revenue .,Which is the least favourable pizza by revenue earning ?,"SELECT TOP 1 od.pizza_id , sum(od.quantity*p.order_price) AS Revenue
FROM order_details$ AS od , pizzas$ AS p
WHERE od.pizza_id = p.pizza_id
GROUP BY od.pizza_id
ORDER BY sum(od.quantity*p.order_price) "
The task is to determine the number of times that each pizza size has been ordered .,How many times has each pizza size been ordered ?,"SELECT p.order_size , SUM(od.quantity) AS Num_orders
FROM pizzas$ AS p
JOIN order_details$ AS od
ON p.pizza_id=od.pizza_id
GROUP BY p.order_size"
The task is to determine the day of the week with the highest revenue ,which day of the week has the highest revenue ?,"with table1 AS
(
SELECT distinct(o.order_date) , DATENAME(dw,o.order_date) AS week_day , sum(od.quantity*p.order_price) AS Revenue
FROM orders$ AS o
JOIN order_details$ AS od
ON o.order_id=od.order_id
JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id
GROUP BY o.order_date
)
SELECT TOP 1 week_day , sum(Revenue) AS Total_revenue_of_weekday
FROM table1
GROUP BY week_day
ORDER BY week_day DESC"
The task is to determine the day of the week with the most number of orders .,Which day of the week has the most number of orders ?,"with table1 AS
(
SELECT distinct(o.order_date) , DATENAME(dw,o.order_date) AS week_day , COUNT(o.order_id) AS Orders
FROM orders$ AS o
GROUP BY o.order_date
)
SELECT TOP 1 week_day , sum(Orders) AS Total_orders_of_weekday
FROM table1
GROUP BY week_day
ORDER BY week_day DESC"
The task is to detrmine the most ordered pizza.,Which pizza size is ordered the highest ?,"SELECT TOP 1 p.order_size , SUM(od.quantity) AS Num_orders
FROM pizzas$ AS p
JOIN order_details$ AS od
ON p.pizza_id=od.pizza_id
GROUP BY p.order_size
ORDER BY SUM(od.quantity) DESC"
The task is to determine the revenue corresponding to pizza sizes .,What is the revenue corresponding to pizza sizes ?,"SELECT p.order_size, sum(od.quantity*p.order_price) AS Revenue
FROM pizzas$ AS p
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
GROUP BY p.order_size"
The task is to determine the 5 months with the most revenue,Which 5 months had the most revenue ?,"SELECT TOP 5 DATENAME(MONTH,o.order_date) AS Month_name , sum(od.quantity*p.order_price) AS Revenue
FROM order_details$ AS od
JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id
JOIN orders$ AS o
ON o.order_id = od.order_id
GROUP BY DATENAME(MONTH,o.order_date) , MONTH(o.order_date)
ORDER BY sum(od.quantity*p.order_price) DESC"
The task is to determine the 5 days with the highest revenue .,Which 5 dates had the most revenue ?,"SELECT TOP 5 CONVERT(date,o.order_date) , sum(od.quantity*p.order_price) AS Revenue
FROM order_details$ AS od
JOIN pizzas$ AS p
ON od.pizza_id=p.pizza_id
JOIN orders$ AS o
ON o.order_id = od.order_id
GROUP BY CONVERT(date,o.order_date)
ORDER BY Revenue DESC"
The task is to determine the 2 dates with the least number of orders ,Which 2 days have the least number of orders ?,"with table1 AS
(
SELECT distinct(o.order_date) , DATENAME(dw,o.order_date) AS week_day , COUNT(o.order_id) AS Orders
FROM orders$ AS o
GROUP BY o.order_date
)
SELECT TOP 2 week_day , sum(Orders) AS Total_orders_of_weekday
FROM table1
GROUP BY week_day
ORDER BY week_day "
The task is to determine 2 days having the least number of pizzas ordered .,Which 2 days have the least number of pizzas ordered ?,"with table1 AS
(
SELECT distinct(o.order_date) , DATENAME(dw,o.order_date) AS week_day , COUNT(od.quantity) AS PizzAS
FROM orders$ AS o
JOIN order_details$ AS od
ON o.order_id=od.order_id
GROUP BY o.order_date
)
SELECT TOP 2 week_day , sum(pizzas) AS PizzAS_on_weekday
FROM table1
GROUP BY week_day
ORDER BY sum(pizzas)"
The task is to determine the frequency of each pizza ordered .,How frequently is each pizza ordered?,"SELECT pizza_id , sum(quantity) AS Number_of_pizzas
FROM order_details$ AS od
GROUP BY pizza_id"
The task is to determine the frequency of each category of pizza ordered .,How frequently is each pizza category ordered?,"SELECT pt.pizza_category , sum (od.quantity)
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON p.pizza_type_id=pt.pizza_type_id
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
GROUP BY pt.pizza_category"
The task is to determine the frequency of each size of pizza ordered .,How frequently is each pizza size ordered ?,"SELECT p.order_size , sum (od.quantity) AS Num_of_pizzas
FROM pizzas$ AS p
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
GROUP BY p.order_size"
The task is to determine the revenue with respect to different sizes of pizza ordered .,What is the total revenue by pizza sizes ?,"SELECT p.order_size, sum (od.quantity*p.order_price) AS Revenue
FROM pizzas$ AS p
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
GROUP BY p.order_size"
The task is to detremine the average price difference between pizzas belonging to categories Supreme and Veggie .,What’s the average order price difference between a Supreme and a Vegggie? ,"SELECT
(
AVG(CASE WHEN pt.pizza_category = 'Supreme' THEN (p.order_price) END) -
AVG(CASE WHEN pt.pizza_category = 'Veggie' THEN (p.order_price) END)
) AS avg_price_difference
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON pt.pizza_type_id=p.pizza_type_id
WHERE pt.pizza_category IN ('Supreme', 'Veggie');"
The task is to determine the best size-pizza combination in terms of revenue .,Which size fares better for which pizza in terms of revenue ?," with table1 AS
(
SELECT
pt.pizza_name ,
p.order_size ,
SUM(od.quantity*p.order_price) AS Revenue ,
ROW_NUMBER() over (partitiON by pt.pizza_name ORDER BY SUM(od.quantity) DESC) AS row_num
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON p.pizza_type_id=pt.pizza_type_id
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
GROUP BY pt.pizza_name , p.order_size
--ORDER BY Num_Orders DESC
)
SELECT pizza_name , order_size , Revenue
FROM table1
WHERE row_num=1
ORDER BY pizza_name"
The tassk is to determine the best size-pizza combination in terms of number of orders .,Which size fares better for which pizza in terms of number of orders ?,"with table1 AS
(
SELECT
pt.pizza_name ,
p.order_size ,
SUM(od.quantity) AS Num_orders ,
ROW_NUMBER() over (partitiON by pt.pizza_name ORDER BY SUM(od.quantity) DESC) AS row_num
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON p.pizza_type_id=pt.pizza_type_id
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
GROUP BY pt.pizza_name , p.order_size
--ORDER BY Num_Orders DESC
)
SELECT pizza_name , order_size , Num_orders
FROM table1
WHERE row_num=1
ORDER BY pizza_name"
The task is to detrmine the number of orders with rewspect to the pizza category,Which pizza category has how many orders ?,"SELECT pt.pizza_category , sum(od.quantity) AS Orders
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON p.pizza_type_id=pt.pizza_type_id
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
GROUP BY pt.pizza_category
"
The task is to determine the revenue with respect to different categories of pizza ordered .,Which pizza category brought how much revenue ?,"SELECT pt.pizza_category , sum(od.quantity*p.order_price) AS Revenue
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON p.pizza_type_id=pt.pizza_type_id
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
GROUP BY pt.pizza_category
"
The task is to determine the category of pizza with the highest number of orders .,which pizza category has the highest number of orders ?,"SELECT TOP 1 pt.pizza_category , COUNT(od.order_id) AS PizzAS
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON p.pizza_type_id=pt.pizza_type_id
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
GROUP BY pt.pizza_category
ORDER BY PizzAS DESC"
The task is to determine the pizz category with the highest revenue .,Which pizza category has the highest revenue ?,"SELECT TOP 1 pt.pizza_category , sum(od.quantity*p.order_price) AS Revenue
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON p.pizza_type_id=pt.pizza_type_id
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
GROUP BY pt.pizza_category
ORDER BY Revenue DESC"
The task is to determine the pizza category with the highest number of pizzas ordered .,Which pizza category has the highest number of pizzas ordered ?,"SELECT TOP 1 pt.pizza_category , sum(od.quantity) AS PizzAS
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON p.pizza_type_id=pt.pizza_type_id
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
GROUP BY pt.pizza_category
ORDER BY PizzAS DESC"
The task is to determine the ingredients in pizzas belonging to pizza category 'Chicken', What are the ingredients used in Chicken pizzas?,"SELECT pizza_name , pizza_ingredients
FROM pizza_types$
WHERE pizza_category='Chicken'"
The task is to determine the ingredients in pizzas belonging to pizza category 'Supreme',What are the ingredients used in Classic pizzas?,"SELECT pizza_name , pizza_ingredients
FROM pizza_types$
WHERE pizza_category='Classic'"
The task is to determine the ingredients in pizzas belonging to pizza category 'Supreme',What are the ingredients used in Supreme pizzas?,"SELECT pizza_name , pizza_ingredients
FROM pizza_types$
WHERE pizza_category='Supreme'"
The task is to determine the ingredients used in Veggie pizzas.,What are the ingredients used in Veggie pizzas?,"SELECT pizza_name , pizza_ingredients
FROM pizza_types$
WHERE pizza_category='Veggie'"
"The task is to determine the average, maximum, and minimum prices for each order size.","What are the average ,maximum and minimum prices for different pizza sizes?","SELECT p.order_size ,
AVG(od.quantity*p.order_price) AS Average_revenue,
MAX(od.quantity*p.order_price) Maximum_revenue,
MIN(od.quantity*p.order_price) AS Minimum_revenue
FROM pizzas$ AS p
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
GROUP BY p.order_size"
"The task is to determine the average, maximum, and minimum prices for each pizza category.","What are the average ,maximum and minimum prices for different pizza categories?","SELECT pt.pizza_category,
AVG(od.quantity*p.order_price) AS Average_revenue,
MAX(od.quantity*p.order_price) Maximum_revenue,
MIN(od.quantity*p.order_price) AS Minimum_revenue
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON p.pizza_type_id = pt.pizza_type_id
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
GROUP BY pt.pizza_category"
The task is to determine the price list for the Veggie pizza based on size.,What is the price list for the Veggie pizza in size 'L' ?,"SELECT p.order_price
FROM pizzas$ AS p
JOIN pizza_types$ AS pt
ON pt.pizza_type_id=p.pizza_type_id
WHERE pt.pizza_category='Veggie' AND p.order_size='L'"
The task is to determine the price list for the Supreme pizza based on size.,What is the price list for the Supreme pizza by pizza size?,"SELECT p.order_size , p.order_price
FROM pizzas$ AS p
JOIN pizza_types$ AS pt
ON pt.pizza_type_id=p.pizza_type_id
WHERE pt.pizza_category='Supreme' "
The task is to determine the cheapest pizza available within category 'Chicken'.,What’s the cheapest pizza available in pizza category 'Chicken'?,"SELECT TOP 1 pt.pizza_name ,p.order_size, p.order_price
FROM pizzas$ AS p
JOIN pizza_types$ AS pt
ON pt.pizza_type_id=p.pizza_type_id
WHERE pt.pizza_category='Chicken'
ORDER BY p.order_price"
The task is to determine the cheapest pizza available in size 'L' in pizza category 'Classic' .,Which is the cheapest pizza of size 'L' available in pizza category 'Classic' ?,"SELECT TOP 1 pt.pizza_name , p.order_price
FROM pizzas$ AS p
JOIN pizza_types$ AS pt
ON pt.pizza_type_id=p.pizza_type_id
WHERE pt.pizza_category='Classic' AND p.order_size='L'
ORDER BY p.order_price"
The task is to determine the most expensive pizza available within pizza category 'Chicken'.,What is the most expensive pizza available in pizza category 'Chicken'?,"SELECT TOP 1 pt.pizza_name ,p.order_size, p.order_price
FROM pizzas$ AS p
JOIN pizza_types$ AS pt
ON pt.pizza_type_id=p.pizza_type_id
WHERE pt.pizza_category='Chicken'
ORDER BY p.order_price DESC"
The task is to determine the average price difference between medium and large sized pizzas.,What’s the average price difference between a medium and a large sized pizza?,"SELECT
(
AVG(CASE WHEN p.order_size = 'M' THEN p.order_price END) -
AVG(CASE WHEN p.order_size = 'L' THEN p.order_price END)
) AS avg_price_difference
FROM pizzas$ AS p
WHERE p.order_size IN ('M', 'L');"
The task is to determine the average price difference between small and large sized pizzas.,What’s the average price difference between a small and a large sized pizza?,"SELECT
(
AVG(CASE WHEN p.order_size = 'S' THEN p.order_price END) -
AVG(CASE WHEN p.order_size = 'L' THEN p.order_price END)
) AS avg_price_difference
FROM pizzas$ AS p
WHERE p.order_size IN ('S', 'L');"
The task is to determine the average price difference between small and large medium sized pizzas.,What’s the average price difference between a small and medium pizza?,"SELECT
(
AVG(CASE WHEN p.order_size = 'S' THEN p.order_price END) -
AVG(CASE WHEN p.order_size = 'M' THEN p.order_price END)
) AS avg_price_difference
FROM pizzas$ AS p
WHERE p.order_size IN ('S', 'M');"
The task is to identify the most popular pizza type based on pizza sales for pizza category 'Veggie',Which type of pizza is most favourable in terms of pizza sales for pizza category Veggie?,"SELECT TOP 1 pt.pizza_name , MAX(od.quantity) AS Num_pizzas
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON p.pizza_type_id=pt.pizza_type_id
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
WHERE pt.pizza_category='Veggie'
GROUP BY pt.pizza_name
ORDER BY Num_pizzas DESC"
The task is to identify the most popular pizza type based on revenue for pizza category 'Supreme'.,Which type of pizza is most favourable in terms of revenue for pizza category Supreme?,"SELECT TOP 1 pt.pizza_name , MAX(od.quantity*p.order_price) AS Revenue
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON p.pizza_type_id=pt.pizza_type_id
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
WHERE pt.pizza_category='Supreme'
GROUP BY pt.pizza_name
ORDER BY Revenue DESC"
The task is to identify the most popular pizza type based on orders for pizza category 'Chicken'.,Which type of pizza is most favourable in tems of orders for pizza category Chicken?,"SELECT TOP 1 pt.pizza_name , COUNT(od.order_id) AS Num_orders
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON p.pizza_type_id=pt.pizza_type_id
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
WHERE pt.pizza_category='Chicken'
GROUP BY pt.pizza_name
ORDER BY Num_orders DESC"
The task is to determine the pizzas which contain chicken as an ingredient ,Which pizzas contain chicken as part ?,"SELECT pizza_name
FROM pizza_types$
WHERE pizza_ingredients LIKE '%chicken%'"
The task is to determine the pizzas which contain 'tomato' as an ingredient ,Which pizzas contain tomatoes as part ?,"SELECT pizza_name
FROM pizza_types$
WHERE pizza_ingredients LIKE '%tomato%'"
The task is to fetch details about pizzas categorized as 'Veggie'.,What is the information about pizzas which categories in the category Veggie ?,"SELECT *
FROM pizza_types$
WHERE pizza_category='Veggie'"
The task is to identify pizza names that fall under the category 'Supreme'.,What are the pizza name which categories in the category Supreme?,"SELECT pizza_name
FROM pizza_types$
WHERE pizza_category='Supreme'"
The task is to identify the order size with the highest prices.,Which order size have highest order prices?,"SELECT TOP 1 order_size , MAX(order_price) AS Max_price
FROM pizzas$
GROUP BY order_size
ORDER BY Max_price DESC"
The task is to identify the top 5 pizzas that contain the most ingredients.,Which 5 pizzas contains maximum number of ingredients?,"SELECT TOP 5
pizza_name ,
(LEN(pizza_ingredients)-LEN(REPLACE(pizza_ingredients,',',''))
) AS num_ingredients
FROM pizza_types$
ORDER BY num_ingredients DESC"
The task is to identify which pizza category contains the most ingredients.,Which pizza category contains maximum number of ingredients?,"SELECT TOP 1
pizza_category ,
SUM(len(pizza_ingredients)-LEN(REPLACE(pizza_ingredients,',',''))
) AS num_ingredients
FROM pizza_types$
GROUP BY pizza_category
ORDER BY num_ingredients DESC"
The task is to determine the average price difference between pizzas of category 'Classic' and 'Supreme'.,What’s the average order price difference between a Classic and a Supreme?,"SELECT
(
AVG(CASE WHEN pt.pizza_category = 'Classic' THEN p.order_price END) -
AVG(CASE WHEN pt.pizza_category = 'Supreme' THEN p.order_price END)
) AS avg_price_difference
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON pt.pizza_type_id = p.pizza_type_id
WHERE pt.pizza_category IN ('Classic', 'Supreme');
"
The task is to determine the average price difference between pizzas of category 'Chicken' and 'Supreme'.,What’s the average order price difference between a Chicken and a Supreme?,"SELECT
(
AVG(CASE WHEN pt.pizza_category = 'Chicken' THEN p.order_price END) -
AVG(CASE WHEN pt.pizza_category = 'Supreme' THEN p.order_price END)
) AS avg_price_difference
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON pt.pizza_type_id = p.pizza_type_id
WHERE pt.pizza_category IN ('Chicken', 'Supreme');
"
The task is to determine the average price difference between pizzas of category 'Classic' and 'Chicken'.,What’s the average order price difference between a Classic and a Chicken?,"SELECT
(
AVG(CASE WHEN pt.pizza_category = 'Classic' THEN p.order_price END) -
AVG(CASE WHEN pt.pizza_category = 'Chicken' THEN p.order_price END)
) AS avg_price_difference
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON pt.pizza_type_id = p.pizza_type_id
WHERE pt.pizza_category IN ('Classic', 'Chicken');
"
The task is to determine the average price difference between pizzas of category 'Classic' and 'Veggie'.,What’s the average order price difference between a Classic and a Vegggie?,"SELECT
(
AVG(CASE WHEN pt.pizza_category = 'Classic' THEN p.order_price END) -
AVG(CASE WHEN pt.pizza_category = 'Vegggie' THEN p.order_price END)
) AS avg_price_difference
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON pt.pizza_type_id = p.pizza_type_id
WHERE pt.pizza_category IN ('Classic', 'Vegggie');
"
The task is to determine the average price difference between pizzas of category 'Chicken' and 'Veggie'.,What’s the average order price difference between a Chicken and a Vegggie?,"SELECT
(
AVG(CASE WHEN pt.pizza_category = 'Chicken' THEN p.order_price END) -
AVG(CASE WHEN pt.pizza_category = 'Vegggie' THEN p.order_price END)
) AS avg_price_difference
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON pt.pizza_type_id = p.pizza_type_id
WHERE pt.pizza_category IN ('Chicken', 'Vegggie');
"
The task is to determine the average price difference between pizzas of category 'Supreme' and 'Veggie'.,What’s the average order price difference between a Supreme and a Vegggie? ,"SELECT
(
AVG(CASE WHEN pt.pizza_category = 'Supreme' THEN p.order_price END) -
AVG(CASE WHEN pt.pizza_category = 'Vegggie' THEN p.order_price END)
) AS avg_price_difference
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON pt.pizza_type_id = p.pizza_type_id
WHERE pt.pizza_category IN ('Supreme', 'Vegggie');
"
The task is to find the pizza with the highest order price in each size.,Which pizza name have a highest order price in respect of order size?,"SELECT TOP 1
p.order_price,
p.order_size,
pt.pizza_name
FROM pizzas$ AS p
JOIN pizza_types$ AS pt
ON pt.pizza_type_id = p.pizza_type_id
ORDER BY p.order_price DESC
"
The task is to determine the average revenue difference between pizzas of category 'Classic' and 'Supreme'.,What is the average revenue difference between Classic and a supreme?,"SELECT
(
AVG(CASE WHEN pt.pizza_category = 'Classic' THEN od.quantity * p.order_price END) -
AVG(CASE WHEN pt.pizza_category = 'Supreme' THEN od.quantity * p.order_price END)
) AS avg_revenue_difference
FROM pizza_types$ AS pt
JOIN pizzas$ AS p
ON pt.pizza_type_id = p.pizza_type_id
JOIN order_details$ AS od
ON p.pizza_id = od.pizza_id
WHERE pt.pizza_category IN ('Classic', 'Supreme');
"
The task is to determine the average revenue difference between small and large sized pizzas.,What is the average revenue diffenrce between order size 'S' and 'L'?,"SELECT
(
AVG(CASE WHEN p.order_size = 'S' THEN (p.order_price*od.quantity) END) -
AVG(CASE WHEN p.order_size = 'L' THEN (p.order_price*od.quantity) END)
) AS avg_price_difference
FROM pizzas$ AS p
JOIN order_details$ AS od
ON od.pizza_id=p.pizza_id
WHERE p.order_size IN ('S', 'L');"
The task is to retrieve pizza details for order ID 57.,What are the pizza details for order id 57 ?,"SELECT CONVERT(date,o.order_date) AS Order_date , CONVERT(time,o.order_time) AS Order_time , od.pizza_id , od.quantity , (od.quantity*p.order_price) AS Revenue
FROM orders$ AS o
JOIN order_details$ AS od
ON o.order_id=od.order_id
JOIN pizzas$ AS p
ON p.pizza_id=od.pizza_id
WHERE o.order_id=57"