Upload text2sql.csv
Browse files- text2sql.csv +131 -0
text2sql.csv
ADDED
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
question,context,sql
|
2 |
+
Give me total company gross bookings in March 2023,"rate type not specified, so use 'USD'. Version not specified, since it is not current month, use 'Actuals'",select sum(gross_bookings) from secure_finance_staging.fds_product_datamart where calendaryear=2023 and calendarmonth=3 and version='Actuals'and rate_type='USD'
|
3 |
+
What is NETR for lob_1001 in March 2023?,"rate type not specified, so use 'USD'. Version not specified, since it is not current month, use 'Actuals'",select sum(netr) from secure_finance_staging.fds_product_datamart where calendaryear=2023 and calendarmonth=3 and version='Actuals'and rate_type='USD' and lob_code = '1001'
|
4 |
+
What were gross bookings in New York last week for lob_1001?,"rate type not specified, so use 'USD'. ",SELECT sum(gross_bookings) FROM secure_finance_staging.fds_product_datamart WHERE version = 'Estimate' AND rate_type = 'USD' AND lob_code = '1001' AND iso_weekofyear = (SELECT MAX(iso_weekofyear) - 1 FROM secure_finance_staging.fds_product_datamart) and city_name = 'New York City'
|
5 |
+
"How much did The lob_1001 mobility business spend on Trip Insurance In March'23, plan rate."," Version not specified, since it is not current month, use 'Actuals'. US = Country - United States.","SELECT sum(trip_insurance)
|
6 |
+
FROM secure_finance_staging.fds_product_datamart
|
7 |
+
WHERE version = 'Actuals'
|
8 |
+
AND rate_type = 'Plan Rate'
|
9 |
+
AND lob_code = '1001'
|
10 |
+
AND country_name = 'Country - United States'
|
11 |
+
and calendaryear=2023
|
12 |
+
and calendarmonth=3"
|
13 |
+
Please provide U4B GBs and completed trips in San Francisco last month for lob_1001 using plan rate,"Version not specified, since it is not current month, use 'Actuals'. ","SELECT sum(trip_insurance)
|
14 |
+
FROM secure_finance_staging.fds_product_datamart
|
15 |
+
WHERE version = 'Actuals'
|
16 |
+
AND rate_type = 'Plan Rate'
|
17 |
+
AND lob_code = '1001'
|
18 |
+
AND city_name = 'San Francisco'
|
19 |
+
and is_u4b=TRUE
|
20 |
+
and calendarmonth=3
|
21 |
+
and calendaryear=2023"
|
22 |
+
What was subs pass revenue in 2023/03 grouped by lob_code?,"rate type not specified, so use 'USD'. Version not specified, since it is not current month, use 'Actuals'","SELECT lob_code, sum(subscription_pass_revenue)
|
23 |
+
FROM secure_finance_staging.fds_product_datamart
|
24 |
+
WHERE version = 'Actuals'
|
25 |
+
AND rate_type = 'USD'
|
26 |
+
and calendarmonth=3
|
27 |
+
and calendaryear=2023
|
28 |
+
GROUP BY lob_code
|
29 |
+
order BY 2 desc"
|
30 |
+
What was adjusted EBITDA by fulfillment type in Australa in March 2023?,"rate type not specified, so use 'USD'. Version not specified, since it is not current month, use 'Actuals'","SELECT fulfillment_type, sum(adj_ebitda)
|
31 |
+
FROM secure_finance_staging.fds_product_datamart
|
32 |
+
WHERE version = 'Actuals'
|
33 |
+
AND rate_type = 'USD'
|
34 |
+
and calendarmonth=3
|
35 |
+
and calendaryear=2023
|
36 |
+
and country_name='Country - Australia'
|
37 |
+
GROUP BY fulfillment_type
|
38 |
+
order BY 2 desc"
|
39 |
+
Give me VC of all flowershops in march 2023,"rate type not specified, so use 'USD'. Version not specified, since it is not current month, use 'Actuals'. flowershop is a type of merchant_type","SELECT sum(variable_contribution)
|
40 |
+
FROM secure_finance_staging.fds_product_datamart
|
41 |
+
WHERE version = 'Actuals'
|
42 |
+
AND rate_type = 'USD'
|
43 |
+
and calendarmonth=3
|
44 |
+
and calendaryear=2023
|
45 |
+
and merchant_type_analytics='MERCHANT_TYPE_FLORIST'"
|
46 |
+
group has_membership gross_bookings = /N by lob_code for mar'23.,"rate type not specified, so use 'USD'. Version not specified, since it is not current month, use 'Actuals'","SELECT
|
47 |
+
lob_code,
|
48 |
+
sum(gross_bookings) as gross_bookings
|
49 |
+
FROM secure_finance_staging.fds_product_datamart
|
50 |
+
WHERE version = 'Actuals'
|
51 |
+
AND rate_type = 'USD'
|
52 |
+
and calendarmonth=3
|
53 |
+
and calendaryear=2023
|
54 |
+
and has_membership IS NULL
|
55 |
+
group by lob_code
|
56 |
+
order by 2 desc"
|
57 |
+
Show me the the metric gross bookings and its children for connect in March of 2023 in plan rate,"Version not specified, since it is not current month, use 'Actuals'","SELECT sum(gross_bookings) as gross_bookings,
|
58 |
+
sum(fares_basket) as fares_basket,
|
59 |
+
sum(booking_eater_fees) as booking_eater_fees,
|
60 |
+
sum(taxes_collected) as taxes_collected
|
61 |
+
FROM secure_finance_staging.fds_product_datamart
|
62 |
+
WHERE version = 'Actuals'
|
63 |
+
AND rate_type = 'Plan Rate'
|
64 |
+
and calendarmonth=3
|
65 |
+
and calendaryear=2023
|
66 |
+
and finance_product_name ='Connect'"
|
67 |
+
"Show me variable contrbution and its children for members vs non members in San Francisco for March, Plan rate","Version not specified, since it is not current month, use 'Actuals'","SELECT
|
68 |
+
has_membership,
|
69 |
+
sum(netr) as netr,
|
70 |
+
sum(variable_costs) as variable_costs,
|
71 |
+
sum(variable_contribution) as variable_contribution
|
72 |
+
FROM secure_finance_staging.fds_product_datamart
|
73 |
+
WHERE version = 'Actuals'
|
74 |
+
AND rate_type = 'Plan Rate'
|
75 |
+
and calendarmonth=3
|
76 |
+
and calendaryear=2023
|
77 |
+
and city_name = ('San Francisco')
|
78 |
+
group by has_membership"
|
79 |
+
Which countries with gbs>10M in the month have the highest NETR as a % of gross bookings in march'23 for lob_2001?,"rate type not specified, so use 'USD'. Version not specified, since it is not current month, use 'Actuals'","SELECT
|
80 |
+
country_name,
|
81 |
+
sum(netr)/sum(gross_bookings) as netr_pct_gb
|
82 |
+
FROM secure_finance_staging.fds_product_datamart
|
83 |
+
WHERE version = 'Actuals'
|
84 |
+
AND rate_type = 'USD'
|
85 |
+
and calendarmonth=3
|
86 |
+
and calendaryear=2023
|
87 |
+
and lob_code ='2001'
|
88 |
+
group by country_name
|
89 |
+
having sum(gross_bookings) > 10000000
|
90 |
+
order by 2 desc"
|
91 |
+
Show me gross bookings per trip for the cities in the United States with the highest gross bookings in March 2023 for lob_1001,"rate type not specified, so use 'USD'. Version not specified, since it is not current month, use 'Actuals'","SELECT
|
92 |
+
city_name,
|
93 |
+
sum(gross_bookings),
|
94 |
+
sum(gross_bookings)/sum(completed_trips) as gb_per_trip
|
95 |
+
FROM secure_finance_staging.fds_product_datamart
|
96 |
+
WHERE version = 'Actuals'
|
97 |
+
AND rate_type = 'USD'
|
98 |
+
and calendarmonth=3
|
99 |
+
and calendaryear=2023
|
100 |
+
and lob_code ='1001'
|
101 |
+
and country_name in ('Country - United States')
|
102 |
+
group by city_name
|
103 |
+
order by 2 desc"
|
104 |
+
What is insurance per mile by product name in in the United States for march'23?,"rate type not specified, so use 'USD'. Version not specified, since it is not current month, use 'Actuals'","SELECT
|
105 |
+
city_name,
|
106 |
+
sum(gross_bookings),
|
107 |
+
sum(gross_bookings)/sum(completed_trips) as gb_per_trip
|
108 |
+
FROM secure_finance_staging.fds_product_datamart
|
109 |
+
WHERE version = 'Actuals'
|
110 |
+
AND rate_type = 'USD'
|
111 |
+
and calendarmonth=3
|
112 |
+
and calendaryear=2023
|
113 |
+
and lob_code ='1001'
|
114 |
+
and country_name in ('Country - United States')
|
115 |
+
group by city_name
|
116 |
+
order by 2 desc"
|
117 |
+
"Show me U4B vs non U4B netr, variable_costs, and variable contribution as a percentage of gross bookings for ","rate type not specified, so use 'USD'. Version not specified, since it is not current month, use 'Actuals'","SELECT
|
118 |
+
is_airport,
|
119 |
+
sum(gross_bookings),
|
120 |
+
sum(netr)/sum(gross_bookings) as netr_pct_gb,
|
121 |
+
sum(variable_costs)/sum(gross_bookings) as varible_costs_pct_gb,
|
122 |
+
sum(variable_contribution)/sum(gross_bookings) as vc_pct_gb
|
123 |
+
FROM secure_finance_staging.fds_product_datamart
|
124 |
+
WHERE version = 'Actuals'
|
125 |
+
AND rate_type = 'USD'
|
126 |
+
and calendarmonth=3
|
127 |
+
and calendaryear=2023
|
128 |
+
and lob_code ='1001'
|
129 |
+
and country_name in ('Country - United States')
|
130 |
+
group by is_airport
|
131 |
+
order by 2 desc"
|