Skip to content

Commit 4369b88

Browse files
authored
chore: update questions.json
fucntion -> function
1 parent e640d58 commit 4369b88

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

training_data/similarweb/questions.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
{
3-
"question":"what are the year on year total visits on Tesla and ford from 2018 to 2023 ? Convert varchar to date using to date fucntion , Plot a line chart ",
3+
"question":"what are the year on year total visits on Tesla and ford from 2018 to 2023 ? Convert varchar to date using to date function , Plot a line chart ",
44
"answer":"SELECT company_name,\r\n extract(year\r\nFROM to_date(date, 'YYYY-MM-DD')) as year, sum(total_visits) as total_visits\r\nFROM s__p_500_by_domain_and_aggregated_by_tickers_sample.datafeeds.sp_500\r\nWHERE (company_name ilike '%Tesla%'\r\n or company_name = 'Ford')\r\n and to_date(date, 'YYYY-MM-DD') between '2018-01-01'\r\n and '2023-12-31'\r\nGROUP BY company_name, extract(year\r\nFROM to_date(date, 'YYYY-MM-DD'))\r\nORDER BY company_name, year;"
55
},
66
{
@@ -52,7 +52,7 @@
5252
"answer":"```\nSELECT TICKER \nFROM S__P_500_BY_DOMAIN_AND_AGGREGATED_BY_TICKERS_SAMPLE.DATAFEEDS.SP_500 \nWHERE DOMAIN = 'google.com'\n```"
5353
},
5454
{
55-
"question":"what are the year on year total visits on ebay and amazon from 2018 to 2021? Convert varchar to date using to date fucntion , Plot a line chart ",
55+
"question":"what are the year on year total visits on ebay and amazon from 2018 to 2021? Convert varchar to date using to date function , Plot a line chart ",
5656
"answer":"SELECT company_name,\n extract(year\nFROM to_date(date, 'YYYY-MM-DD')) as year, sum(total_visits) as total_visits\nFROM s__p_500_by_domain_and_aggregated_by_tickers_sample.datafeeds.sp_500\nWHERE (company_name ilike '%ebay%'\n or company_name ilike '%amazon%')\n and to_date(date, 'YYYY-MM-DD') between '2018-01-01'\n and '2021-12-31'\nGROUP BY company_name, extract(year\nFROM to_date(date, 'YYYY-MM-DD'))\nORDER BY company_name, year;"
5757
},
5858
{
@@ -120,7 +120,7 @@
120120
"answer":"```\r\nSELECT DATE,\r\n SUM(CASE WHEN DOMAIN = 'google.com' THEN TOTAL_VISITS ELSE 0 END) AS GOOGLE_VISITS,\r\n SUM(CASE WHEN DOMAIN = 'bing.com' THEN TOTAL_VISITS ELSE 0 END) AS BING_VISITS\r\nFROM S__P_500_BY_DOMAIN_AND_AGGREGATED_BY_TICKERS_SAMPLE.DATAFEEDS.SP_500\r\nWHERE DOMAIN IN ('google.com', 'bing.com')\r\nGROUP BY DATE\r\nORDER BY DATE ASC\r\n```"
121121
},
122122
{
123-
"question":"what are the year on year total visits on Tesla and general mills from 2018 to 2021 ? Convert varchar to date using to date fucntion , Plot a line chart ",
123+
"question":"what are the year on year total visits on Tesla and general mills from 2018 to 2021 ? Convert varchar to date using to date function , Plot a line chart ",
124124
"answer":"SELECT company_name,\n extract(year\nFROM to_date(date, 'YYYY-MM-DD')) as year, sum(total_visits) as total_visits\nFROM s__p_500_by_domain_and_aggregated_by_tickers_sample.datafeeds.sp_500\nWHERE (company_name ilike '%tesla%'\n or company_name ilike '%general mills%')\n and to_date(date, 'YYYY-MM-DD') between '2018-01-01'\n and '2021-12-31'\nGROUP BY company_name, extract(year\nFROM to_date(date, 'YYYY-MM-DD'))\nORDER BY company_name, year;"
125125
},
126126
{
@@ -192,7 +192,7 @@
192192
"answer":"SELECT company_name,\r\n sum(total_visits) as visits\r\nFROM s__p_500_by_domain_and_aggregated_by_tickers_sample.datafeeds.sp_500\r\nWHERE to_date(date, 'YYYY-MM-DD') between '2021-01-01'\r\n and '2021-12-31'\r\nGROUP BY company_name\r\nORDER BY visits desc limit 5;"
193193
},
194194
{
195-
"question":"what are the year on year total visits on ebay and amazon from 2018 to 2023 ? Convert varchar to date using to date fucntion , Plot a line chart ",
195+
"question":"what are the year on year total visits on ebay and amazon from 2018 to 2023 ? Convert varchar to date using to date function , Plot a line chart ",
196196
"answer":"SELECT company_name,\n extract(year\nFROM to_date(date, 'YYYY-MM-DD')) as year, sum(total_visits) as total_visits\nFROM s__p_500_by_domain_and_aggregated_by_tickers_sample.datafeeds.sp_500\nWHERE (company_name ilike '%ebay%'\n or company_name ilike '%amazon%')\n and to_date(date, 'YYYY-MM-DD') between '2018-01-01'\n and '2023-12-31'\nGROUP BY company_name, extract(year\nFROM to_date(date, 'YYYY-MM-DD'))\nORDER BY company_name, year;"
197197
},
198198
{
@@ -204,7 +204,7 @@
204204
"answer":"SELECT domain,\r\n sum(total_visits) as total_visits\r\nFROM s__p_500_by_domain_and_aggregated_by_tickers_sample.datafeeds.sp_500\r\nWHERE date in ('2021-11-26', '2021-11-26')\r\nGROUP BY domain\r\nORDER BY total_visits desc"
205205
},
206206
{
207-
"question":"what are the year on year total visits on Tesla and ford from 2018 to 2021 ? Convert varchar to date using to date fucntion , Plot a line chart ",
207+
"question":"what are the year on year total visits on Tesla and ford from 2018 to 2021 ? Convert varchar to date using to date function , Plot a line chart ",
208208
"answer":"SELECT company_name,\r\n extract(year\r\nFROM to_date(date, 'YYYY-MM-DD')) as year, sum(total_visits) as total_visits\r\nFROM s__p_500_by_domain_and_aggregated_by_tickers_sample.datafeeds.sp_500\r\nWHERE (company_name ilike '%tesla%'\r\n or company_name = 'Ford')\r\n and to_date(date, 'YYYY-MM-DD') between '2018-01-01'\r\n and '2021-12-31'\r\nGROUP BY company_name, extract(year\r\nFROM to_date(date, 'YYYY-MM-DD'))\r\nORDER BY company_name, year;"
209209
},
210210
{
@@ -264,7 +264,7 @@
264264
"answer":"```\nSELECT DOMAIN, ROUND(AVG(TOTAL_AVG_VISIT_DURATION),2) AS AVG_DURATION \nFROM S__P_500_BY_DOMAIN_AND_AGGREGATED_BY_TICKERS_SAMPLE.DATAFEEDS.SP_500 \nGROUP BY DOMAIN \nORDER BY SUM(TOTAL_VISITS) DESC \nLIMIT 100\n```"
265265
},
266266
{
267-
"question":"what are the year on year total visits on Tesla and general mills from 2018 to 2023 ? Convert varchar to date using to date fucntion ",
267+
"question":"what are the year on year total visits on Tesla and general mills from 2018 to 2023 ? Convert varchar to date using to date function ",
268268
"answer":"SELECT company_name,\n extract(year\nFROM to_date(date, 'YYYY-MM-DD')) as year, sum(total_visits) as total_visits\nFROM s__p_500_by_domain_and_aggregated_by_tickers_sample.datafeeds.sp_500\nWHERE (company_name ilike '%tesla%'\n or company_name ilike '%general mills%')\n and to_date(date, 'YYYY-MM-DD') between '2018-01-01'\n and '2023-12-31'\nGROUP BY company_name, extract(year\nFROM to_date(date, 'YYYY-MM-DD'))\nORDER BY company_name, year;"
269269
},
270270
{
@@ -284,7 +284,7 @@
284284
"answer":"SELECT sum(mobile_visits) as mobile_visits\nFROM s__p_500_by_domain_and_aggregated_by_tickers_sample.datafeeds.sp_500\nWHERE company_name ilike '%google%'\n and to_date(date, 'YYYY-MM-DD') between '2010-12-31'\n and '2021-01-01';"
285285
},
286286
{
287-
"question":"what are the year on year total visits on Coca Coal and Pepsi from 2018 to 2021 ? Convert varchar to date using to date fucntion ",
287+
"question":"what are the year on year total visits on Coca Coal and Pepsi from 2018 to 2021 ? Convert varchar to date using to date function ",
288288
"answer":"SELECT company_name,\n extract(year\nFROM to_date(date, 'YYYY-MM-DD')) as year, sum(total_visits) as total_visits\nFROM s__p_500_by_domain_and_aggregated_by_tickers_sample.datafeeds.sp_500\nWHERE (company_name ilike '%coca-cola%'\n or company_name ilike '%pepsi%')\n and to_date(date, 'YYYY-MM-DD') between '2018-01-01'\n and '2021-12-31'\nGROUP BY company_name, extract(year\nFROM to_date(date, 'YYYY-MM-DD'))\nORDER BY company_name, year;"
289289
},
290290
{
@@ -336,7 +336,7 @@
336336
"answer":"SELECT year,\r\n mobile_visits - lag(mobile_visits,\r\n 1) OVER (ORDER BY year) as mobile_visits_growth,\r\n round((mobile_visits - lag(mobile_visits, 1) OVER (ORDER BY year)) * 100.0 \/ nullif(lag(mobile_visits, 1) OVER (ORDER BY year), 0),\r\n 2) as mobile_visits_growth_percentage\r\nFROM (SELECT date_trunc('year', to_date(date, 'YYYY-MM-DD')) as year,\r\n sum(mobile_visits) as mobile_visits\r\n FROM s__p_500_by_domain_and_aggregated_by_tickers_sample.datafeeds.sp_500\r\n WHERE company_name ilike '%alphabet%'\r\n and to_date(date, 'YYYY-MM-DD') between '2010-01-01'\r\n and '2021-12-31'\r\n GROUP BY date_trunc('year', to_date(date, 'YYYY-MM-DD'))) subquery\r\nORDER BY year"
337337
},
338338
{
339-
"question":"what are the year on year total visits on Tesla and general mills from 2018 to 2021 ? Convert varchar to date using to date fucntion ",
339+
"question":"what are the year on year total visits on Tesla and general mills from 2018 to 2021 ? Convert varchar to date using to date function ",
340340
"answer":"SELECT company_name,\n extract(year\nFROM to_date(date, 'YYYY-MM-DD')) as year, sum(total_visits) as total_visits\nFROM s__p_500_by_domain_and_aggregated_by_tickers_sample.datafeeds.sp_500\nWHERE (company_name ilike '%tesla%'\n or company_name ilike '%general mills%')\n and to_date(date, 'YYYY-MM-DD') between '2018-01-01'\n and '2021-12-31'\nGROUP BY company_name, extract(year\nFROM to_date(date, 'YYYY-MM-DD'))\nORDER BY company_name, year;"
341341
},
342342
{
@@ -347,4 +347,4 @@
347347
"question":"What is the percentage change in domains which had the highest mobile traffic between 2022 and 2021?",
348348
"answer":"with mobile_visits as (SELECT domain,\n sum(case when date between '2021-11-01' and\n '2021-11-30' then mobile_visits\n else 0 end) as mobile_visits_2021,\n sum(case when date between '2022-11-01' and\n '2022-11-30' then mobile_visits\n else 0 end) as mobile_visits_2022\n FROM s__p_500_by_domain_and_aggregated_by_tickers_sample.datafeeds.sp_500\n GROUP BY domain), top_domains as (SELECT domain,\n mobile_visits_2021,\n mobile_visits_2022,\n rank() OVER (ORDER BY mobile_visits_2022 desc) as rank_2022,\n rank() OVER (ORDER BY mobile_visits_2021 desc) as rank_2021\n FROM mobile_visits)\nSELECT top 10 t.domain,\n round((t.mobile_visits_2022 - t.mobile_visits_2021) \/ t.mobile_visits_2021 * 100,\n 2) as mobile_traffic_percentage_change\nFROM top_domains t\nWHERE t.rank_2022 <= 10\n and t.rank_2021 <= 10\nORDER BY mobile_traffic_percentage_change desc"
349349
}
350-
]
350+
]

0 commit comments

Comments
 (0)