diff --git "a/evaluation_set/spider2_lite_256.csv" "b/evaluation_set/spider2_lite_256.csv" --- "a/evaluation_set/spider2_lite_256.csv" +++ "b/evaluation_set/spider2_lite_256.csv" @@ -1,4 +1,4 @@ -instance_id,db_id,db_type,question,gold_sql,gold_columns,n_gold_columns,gold_derivation,snow_instance_id +instance_id,db_id,db_type,question,gold_sql,gold_columns,n_gold_columns,n_schema_columns,gold_derivation,snow_instance_id sf001,GLOBAL_WEATHER__CLIMATE_DATA_FOR_BI,snowflake,"Assuming today is April 1, 2024, I would like to know the daily snowfall amounts greater than 6 inches for each U.S. postal code during the week ending after the first two full weeks of the previous year. Show the postal code, date, and snowfall amount.","WITH timestamps AS ( SELECT @@ -27,7 +27,7 @@ WHERE tot_snowfall_in > 6.0 ORDER BY postal_code,date_valid_std -;",HISTORY_DAY.COUNTRY; HISTORY_DAY.DATE_VALID_STD; HISTORY_DAY.POSTAL_CODE; HISTORY_DAY.TOT_SNOWFALL_IN,4,lite_sql,sf001 +;",HISTORY_DAY.COUNTRY; HISTORY_DAY.DATE_VALID_STD; HISTORY_DAY.POSTAL_CODE; HISTORY_DAY.TOT_SNOWFALL_IN,4,215,lite_sql,sf001 sf002,FINANCE__ECONOMICS,snowflake,"As of December 31, 2022, list the top 10 active large banks, each with assets over $10 billion, that have the highest percentage of uninsured assets based on quarterly estimates. Provide the names of these banks and their respective percentages of uninsured assets.","WITH big_banks AS ( SELECT id_rssd FROM FINANCE__ECONOMICS.CYBERSYN.financial_institution_timeseries @@ -45,7 +45,7 @@ WHERE ts.date = '2022-12-31' AND att.frequency = 'Quarterly' AND ent.is_active = True ORDER BY (1 - value) DESC -LIMIT 10;",FINANCIAL_INSTITUTION_ENTITIES.ID_RSSD; FINANCIAL_INSTITUTION_ENTITIES.IS_ACTIVE; FINANCIAL_INSTITUTION_ENTITIES.NAME; FINANCIAL_INSTITUTION_TIMESERIES.DATE; FINANCIAL_INSTITUTION_TIMESERIES.ID_RSSD; FINANCIAL_INSTITUTION_TIMESERIES.VALUE; FINANCIAL_INSTITUTION_TIMESERIES.VARIABLE,7,snow_sql_near_exact,sf002 +LIMIT 10;",FINANCIAL_INSTITUTION_ENTITIES.ID_RSSD; FINANCIAL_INSTITUTION_ENTITIES.IS_ACTIVE; FINANCIAL_INSTITUTION_ENTITIES.NAME; FINANCIAL_INSTITUTION_TIMESERIES.DATE; FINANCIAL_INSTITUTION_TIMESERIES.ID_RSSD; FINANCIAL_INSTITUTION_TIMESERIES.VALUE; FINANCIAL_INSTITUTION_TIMESERIES.VARIABLE,7,441,snow_sql_near_exact,sf002 sf011,CENSUS_GALAXY__ZIP_CODE_TO_BLOCK_GROUP_SAMPLE,snowflake,"Determine the population distribution within each block group relative to its census tract in New York State using 2021 ACS data. Include block group ID, census value, state county tract ID, total tract population, and the population ratio of each block group.","WITH TractPop AS ( SELECT CG.""BlockGroupID"", @@ -88,7 +88,7 @@ FROM TractPop TP JOIN TractGroup TG - ON TP.""StateCountyTractID"" = TG.""StateCountyTractID"";",Dim_CensusGeography.BlockGroupID; Dim_CensusGeography.BlockGroupPolygon; Dim_CensusGeography.StateAbbrev; Dim_CensusGeography.StateCountyTractID; Fact_CensusValues_ACS2021.BlockGroupID; Fact_CensusValues_ACS2021.CensusValue; Fact_CensusValues_ACS2021.MetricID,7,lite_sql,sf011 + ON TP.""StateCountyTractID"" = TG.""StateCountyTractID"";",Dim_CensusGeography.BlockGroupID; Dim_CensusGeography.BlockGroupPolygon; Dim_CensusGeography.StateAbbrev; Dim_CensusGeography.StateCountyTractID; Fact_CensusValues_ACS2021.BlockGroupID; Fact_CensusValues_ACS2021.CensusValue; Fact_CensusValues_ACS2021.MetricID,7,57,lite_sql,sf011 sf012,WEATHER__ENVIRONMENT,snowflake,What were the total amounts of building and contents damage reported under the National Flood Insurance Program in the City of New York for each year from 2010 to 2019?,"SELECT YEAR(claims.date_of_loss) AS year_of_loss, claims.nfip_community_name, @@ -99,7 +99,7 @@ WHERE claims.nfip_community_name = 'City Of New York' AND year_of_loss >=2010 AND year_of_loss <=2019 GROUP BY year_of_loss, claims.nfip_community_name -ORDER BY year_of_loss, claims.nfip_community_name;",FEMA_NATIONAL_FLOOD_INSURANCE_PROGRAM_CLAIM_INDEX.BUILDING_DAMAGE_AMOUNT; FEMA_NATIONAL_FLOOD_INSURANCE_PROGRAM_CLAIM_INDEX.CONTENTS_DAMAGE_AMOUNT; FEMA_NATIONAL_FLOOD_INSURANCE_PROGRAM_CLAIM_INDEX.DATE_OF_LOSS; FEMA_NATIONAL_FLOOD_INSURANCE_PROGRAM_CLAIM_INDEX.NFIP_COMMUNITY_NAME,4,snow_sql_near_exact,sf012 +ORDER BY year_of_loss, claims.nfip_community_name;",FEMA_NATIONAL_FLOOD_INSURANCE_PROGRAM_CLAIM_INDEX.BUILDING_DAMAGE_AMOUNT; FEMA_NATIONAL_FLOOD_INSURANCE_PROGRAM_CLAIM_INDEX.CONTENTS_DAMAGE_AMOUNT; FEMA_NATIONAL_FLOOD_INSURANCE_PROGRAM_CLAIM_INDEX.DATE_OF_LOSS; FEMA_NATIONAL_FLOOD_INSURANCE_PROGRAM_CLAIM_INDEX.NFIP_COMMUNITY_NAME,4,313,snow_sql_near_exact,sf012 sf014,CENSUS_GALAXY__AIML_MODEL_DATA_ENRICHMENT_SAMPLE,snowflake,"What is the New York State ZIP code with the highest number of commuters traveling over one hour, according to 2021 ACS data? Include the zip code, the total commuters, state benchmark for this duration, and state population.","WITH Commuters AS ( SELECT GE.""ZipCode"", @@ -147,7 +147,7 @@ GROUP BY C.""ZipCode"", SB.""StateBenchmark_Over1HrTravelTime"", SB.""TotalStatePopulation"" ORDER BY ""Total_Commuters_1Hr_Travel_Time"" DESC -LIMIT 1;",Dim_CensusMetrics.MetricID; Fact_CensusValues_ACS2021_ByZip.CensusValueByZip; Fact_CensusValues_ACS2021_ByZip.MetricID; Fact_CensusValues_ACS2021_ByZip.ZipCode; Fact_StateBenchmark_ACS2021.MetricID; Fact_StateBenchmark_ACS2021.StateAbbrev; Fact_StateBenchmark_ACS2021.StateBenchmarkValue; Fact_StateBenchmark_ACS2021.TotalStatePopulation; LU_GeographyExpanded.PreferredStateAbbrev; LU_GeographyExpanded.ZipCode,10,snow_sql_near_exact,sf014 +LIMIT 1;",Dim_CensusMetrics.MetricID; Fact_CensusValues_ACS2021_ByZip.CensusValueByZip; Fact_CensusValues_ACS2021_ByZip.MetricID; Fact_CensusValues_ACS2021_ByZip.ZipCode; Fact_StateBenchmark_ACS2021.MetricID; Fact_StateBenchmark_ACS2021.StateAbbrev; Fact_StateBenchmark_ACS2021.StateBenchmarkValue; Fact_StateBenchmark_ACS2021.TotalStatePopulation; LU_GeographyExpanded.PreferredStateAbbrev; LU_GeographyExpanded.ZipCode,10,57,snow_sql_near_exact,sf014 sf018,BRAZE_USER_EVENT_DEMO_DATASET,snowflake,"Examine user engagement with push notifications within a specified one-hour window on June 1, 2023.","WITH push_send AS ( SELECT id, @@ -268,7 +268,7 @@ FROM AND ps.user_id = poi.user_id AND ps.app_group_id = poi.app_group_id GROUP BY - 1,2,3,4,5,6,7,8,9,10,11;",USERS_MESSAGES_PUSHNOTIFICATION_BOUNCE_VIEW.AD_TRACKING_ENABLED; USERS_MESSAGES_PUSHNOTIFICATION_BOUNCE_VIEW.APP_GROUP_ID; USERS_MESSAGES_PUSHNOTIFICATION_BOUNCE_VIEW.CAMPAIGN_ID; USERS_MESSAGES_PUSHNOTIFICATION_BOUNCE_VIEW.ID; USERS_MESSAGES_PUSHNOTIFICATION_BOUNCE_VIEW.PLATFORM; USERS_MESSAGES_PUSHNOTIFICATION_BOUNCE_VIEW.TIME; USERS_MESSAGES_PUSHNOTIFICATION_BOUNCE_VIEW.USER_ID; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.APP_GROUP_ID; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.CAMPAIGN_ID; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.ID; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.PLATFORM; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.TIME; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.USER_ID; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.AD_TRACKING_ENABLED; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.APP_GROUP_ID; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.CAMPAIGN_ID; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.ID; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.PLATFORM; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.TIME; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.USER_ID; USERS_MESSAGES_PUSHNOTIFICATION_SEND_VIEW.AD_TRACKING_ENABLED; USERS_MESSAGES_PUSHNOTIFICATION_SEND_VIEW.APP_GROUP_ID; USERS_MESSAGES_PUSHNOTIFICATION_SEND_VIEW.CAMPAIGN_ID; USERS_MESSAGES_PUSHNOTIFICATION_SEND_VIEW.ID; USERS_MESSAGES_PUSHNOTIFICATION_SEND_VIEW.PLATFORM; USERS_MESSAGES_PUSHNOTIFICATION_SEND_VIEW.TIME; USERS_MESSAGES_PUSHNOTIFICATION_SEND_VIEW.USER_ID,27,lite_sql,sf018 + 1,2,3,4,5,6,7,8,9,10,11;",USERS_MESSAGES_PUSHNOTIFICATION_BOUNCE_VIEW.AD_TRACKING_ENABLED; USERS_MESSAGES_PUSHNOTIFICATION_BOUNCE_VIEW.APP_GROUP_ID; USERS_MESSAGES_PUSHNOTIFICATION_BOUNCE_VIEW.CAMPAIGN_ID; USERS_MESSAGES_PUSHNOTIFICATION_BOUNCE_VIEW.ID; USERS_MESSAGES_PUSHNOTIFICATION_BOUNCE_VIEW.PLATFORM; USERS_MESSAGES_PUSHNOTIFICATION_BOUNCE_VIEW.TIME; USERS_MESSAGES_PUSHNOTIFICATION_BOUNCE_VIEW.USER_ID; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.APP_GROUP_ID; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.CAMPAIGN_ID; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.ID; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.PLATFORM; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.TIME; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.USER_ID; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.AD_TRACKING_ENABLED; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.APP_GROUP_ID; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.CAMPAIGN_ID; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.ID; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.PLATFORM; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.TIME; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.USER_ID; USERS_MESSAGES_PUSHNOTIFICATION_SEND_VIEW.AD_TRACKING_ENABLED; USERS_MESSAGES_PUSHNOTIFICATION_SEND_VIEW.APP_GROUP_ID; USERS_MESSAGES_PUSHNOTIFICATION_SEND_VIEW.CAMPAIGN_ID; USERS_MESSAGES_PUSHNOTIFICATION_SEND_VIEW.ID; USERS_MESSAGES_PUSHNOTIFICATION_SEND_VIEW.PLATFORM; USERS_MESSAGES_PUSHNOTIFICATION_SEND_VIEW.TIME; USERS_MESSAGES_PUSHNOTIFICATION_SEND_VIEW.USER_ID,27,1780,lite_sql,sf018 sf040,US_ADDRESSES__POI,snowflake,"Find the top 10 northernmost addresses in Florida's largest zip code area. What are their address numbers, street names, and types?","WITH zip_areas AS ( SELECT geo.geo_id, @@ -299,7 +299,7 @@ JOIN zip_area_ranks AS areas ON (addr.id_zip = areas.geo_id) WHERE addr.state = 'FL' AND areas.country = 'United States' AND areas.zip_area_rank = 1 ORDER BY LATITUDE DESC -LIMIT 10;",GEOGRAPHY_CHARACTERISTICS.GEO_ID; GEOGRAPHY_CHARACTERISTICS.RELATIONSHIP_TYPE; GEOGRAPHY_CHARACTERISTICS.VALUE; GEOGRAPHY_INDEX.GEO_ID; GEOGRAPHY_INDEX.GEO_NAME; GEOGRAPHY_INDEX.LEVEL; GEOGRAPHY_RELATIONSHIPS.GEO_ID; GEOGRAPHY_RELATIONSHIPS.RELATED_GEO_NAME; GEOGRAPHY_RELATIONSHIPS.RELATED_LEVEL; US_ADDRESSES.ID_ZIP; US_ADDRESSES.LATITUDE; US_ADDRESSES.NUMBER; US_ADDRESSES.STATE; US_ADDRESSES.STREET; US_ADDRESSES.STREET_TYPE,15,lite_sql,sf040 +LIMIT 10;",GEOGRAPHY_CHARACTERISTICS.GEO_ID; GEOGRAPHY_CHARACTERISTICS.RELATIONSHIP_TYPE; GEOGRAPHY_CHARACTERISTICS.VALUE; GEOGRAPHY_INDEX.GEO_ID; GEOGRAPHY_INDEX.GEO_NAME; GEOGRAPHY_INDEX.LEVEL; GEOGRAPHY_RELATIONSHIPS.GEO_ID; GEOGRAPHY_RELATIONSHIPS.RELATED_GEO_NAME; GEOGRAPHY_RELATIONSHIPS.RELATED_LEVEL; US_ADDRESSES.ID_ZIP; US_ADDRESSES.LATITUDE; US_ADDRESSES.NUMBER; US_ADDRESSES.STATE; US_ADDRESSES.STREET; US_ADDRESSES.STREET_TYPE,15,61,lite_sql,sf040 sf044,FINANCE__ECONOMICS,snowflake,"What was the percentage change in post-market close prices for the Magnificent 7 tech companies from January 1 to June 30, 2024?","WITH ytd_performance AS ( SELECT ticker, @@ -320,7 +320,7 @@ FROM ytd_performance GROUP BY ticker, start_of_year_date, start_of_year_price, latest_date, latest_price -ORDER BY percentage_change_ytd DESC;",STOCK_PRICE_TIMESERIES.DATE; STOCK_PRICE_TIMESERIES.TICKER; STOCK_PRICE_TIMESERIES.VALUE; STOCK_PRICE_TIMESERIES.VARIABLE_NAME,4,lite_sql,sf044 +ORDER BY percentage_change_ytd DESC;",STOCK_PRICE_TIMESERIES.DATE; STOCK_PRICE_TIMESERIES.TICKER; STOCK_PRICE_TIMESERIES.VALUE; STOCK_PRICE_TIMESERIES.VARIABLE_NAME,4,441,lite_sql,sf044 bq001,ga360,bigquery,"I wonder how many days between the first transaction and the first visit both in Feburary 2017 for each transacting visitor, along with the device used in the transaction.","DECLARE start_date STRING DEFAULT '20170201'; DECLARE end_date STRING DEFAULT '20170228'; @@ -383,7 +383,7 @@ SELECT DATE_DIFF(PARSE_DATE('%Y%m%d', date_transactions), PARSE_DATE('%Y%m%d', date_first_visit), DAY) AS time, device_transaction FROM visits_transactions -ORDER BY fullvisitorid;",ga_sessions_*.date; ga_sessions_*.device; ga_sessions_*.fullVisitorId; ga_sessions_*.hits,4,lite_sql,sf_bq001 +ORDER BY fullvisitorid;",ga_sessions_*.date; ga_sessions_*.device; ga_sessions_*.fullVisitorId; ga_sessions_*.hits,4,16,lite_sql,sf_bq001 bq002,ga360,bigquery,"What's the maximum monthly, weekly, and daily product revenues (in millions) generated by the top-performing traffic source in the first half of 2017?","DECLARE start_date STRING DEFAULT '20170101'; DECLARE end_date STRING DEFAULT '20170630'; @@ -474,7 +474,7 @@ max_revenues AS ( SELECT max_revenue FROM max_revenues -ORDER BY max_revenue DESC;",ga_sessions_*.date; ga_sessions_*.hits; ga_sessions_*.trafficSource,3,lite_sql,sf_bq002 +ORDER BY max_revenue DESC;",ga_sessions_*.date; ga_sessions_*.hits; ga_sessions_*.trafficSource,3,16,lite_sql,sf_bq002 bq003,ga360,bigquery,Compare the average pageviews per visitor between purchase and non-purchase sessions for each month from April to July in 2017.,"WITH cte1 AS ( SELECT CONCAT(EXTRACT(YEAR FROM (PARSE_DATE('%Y%m%d', date))), '0', @@ -509,7 +509,7 @@ SELECT month, avg_pageviews_purchase, avg_pageviews_non_purchase FROM cte1 INNER JOIN cte2 USING(month) -ORDER BY month;",ga_sessions_*.date; ga_sessions_*.fullVisitorId; ga_sessions_*.hits; ga_sessions_*.totals,4,lite_sql,sf_bq003 +ORDER BY month;",ga_sessions_*.date; ga_sessions_*.fullVisitorId; ga_sessions_*.hits; ga_sessions_*.totals,4,16,lite_sql,sf_bq003 bq004,ga360,bigquery,What's the most popular other purchased product in July 2017 with consumers who bought products relevant to YouTube?,"with product_and_quatity AS ( SELECT DISTINCT v2ProductName AS other_purchased_products, @@ -537,7 +537,7 @@ bq004,ga360,bigquery,What's the most popular other purchased product in July 201 SELECT other_purchased_products FROM product_and_quatity ORDER BY quatity DESC -LIMIT 1;",ga_sessions_*.fullVisitorId; ga_sessions_*.hits,2,lite_sql,sf_bq004 +LIMIT 1;",ga_sessions_*.fullVisitorId; ga_sessions_*.hits,2,16,lite_sql,sf_bq004 bq006,austin,bigquery,What is the date with the second highest Z-score for daily counts of 'PUBLIC INTOXICATION' incidents in Austin for the year 2016? List the date in the format of '2016-xx-xx'.,"WITH incident_stats AS ( SELECT COUNT(descript) AS total_pub_intox @@ -576,7 +576,7 @@ FROM ORDER BY z_score DESC LIMIT 1 -OFFSET 1",incidents_*.date; incidents_*.descript,2,lite_sql,sf_bq006 +OFFSET 1",incidents_*.date; incidents_*.descript,2,81,lite_sql,sf_bq006 bq008,ga360,bigquery,"What's the most common next page for visitors who were part of ""Data Share"" campaign and after they accessed the page starting with '/home' in January 2017. And what's the maximum duration time (in seconds) when they visit the corresponding home page?","with page_visit_sequence AS ( SELECT fullVisitorID, @@ -652,7 +652,7 @@ SELECT max_duration FROM most_common_next_page, - max_page_duration;",ga_sessions_*.fullVisitorId; ga_sessions_*.hits; ga_sessions_*.trafficSource; ga_sessions_*.visitId; ga_sessions_*.visitStartTime,5,lite_sql,sf_bq008 + max_page_duration;",ga_sessions_*.fullVisitorId; ga_sessions_*.hits; ga_sessions_*.trafficSource; ga_sessions_*.visitId; ga_sessions_*.visitStartTime,5,16,lite_sql,sf_bq008 bq009,ga360,bigquery,"Which traffic source receives the top revenue in 2017 and what is the difference (millions, rounded to two decimal places) between its highest and lowest revenue months?","WITH MONTHLY_REVENUE AS ( SELECT FORMAT_DATE(""%Y%m"", PARSE_DATE(""%Y%m%d"", date)) AS month, @@ -700,7 +700,7 @@ REVENUE_DIFF AS ( SELECT source, diff_revenue -FROM REVENUE_DIFF;",ga_sessions_*.date; ga_sessions_*.totals; ga_sessions_*.trafficSource,3,lite_sql,sf_bq009 +FROM REVENUE_DIFF;",ga_sessions_*.date; ga_sessions_*.totals; ga_sessions_*.trafficSource,3,16,lite_sql,sf_bq009 bq010,ga360,bigquery,"Find the top-selling product among customers who bought 'Youtube Men’s Vintage Henley' in July 2017, excluding itself.","WITH GET_CUS_ID AS ( SELECT DISTINCT fullVisitorId as Henley_CUSTOMER_ID @@ -731,7 +731,7 @@ GROUP BY product.v2ProductName ORDER BY SUM(product.productQuantity) DESC -LIMIT 1;",ga_sessions_*.fullVisitorId; ga_sessions_*.hits,2,lite_sql,sf_bq010 +LIMIT 1;",ga_sessions_*.fullVisitorId; ga_sessions_*.hits,2,16,lite_sql,sf_bq010 bq011,ga4,bigquery,"How many pseudo users were active in the last 7 days but inactive in the last 2 days as of January 7, 2021?","SELECT COUNT(DISTINCT MDaysUsers.user_pseudo_id) AS n_day_inactive_users_count FROM @@ -762,7 +762,7 @@ LEFT JOIN ) AS NDaysUsers ON MDaysUsers.user_pseudo_id = NDaysUsers.user_pseudo_id WHERE - NDaysUsers.user_pseudo_id IS NULL;",events_*.event_params; events_*.event_timestamp; events_*.user_pseudo_id,3,lite_sql,sf_bq011 + NDaysUsers.user_pseudo_id IS NULL;",events_*.event_params; events_*.event_timestamp; events_*.user_pseudo_id,3,23,lite_sql,sf_bq011 sf_bq012,ETHEREUM_BLOCKCHAIN,snowflake,"What is the average balance of the top 10 addresses with the most balance on the Ethereum blockchain, considering both incoming and outgoing transactions with valid addresses, but only those recorded as used on receipt, as well as transaction fees? Only keep successful transactions with no call type or where the call type is 'call'. The average balance, expressed in quadrillions (10^15), is rounded to two decimal places.","WITH double_entry_book AS ( -- Debits SELECT @@ -814,7 +814,7 @@ top_10_balances AS ( ) SELECT ROUND(AVG(""balance"") / 1e15, 2) AS ""average_balance_trillion"" -FROM top_10_balances;",BLOCKS.hash; BLOCKS.miner; TRACES.call_type; TRACES.from_address; TRACES.status; TRACES.to_address; TRACES.trace_type; TRACES.value; TRANSACTIONS.block_hash; TRANSACTIONS.from_address; TRANSACTIONS.gas_price; TRANSACTIONS.receipt_gas_used; TRANSACTIONS.receipt_status,13,snow_sql_near_exact,sf_bq012 +FROM top_10_balances;",BLOCKS.hash; BLOCKS.miner; TRACES.call_type; TRACES.from_address; TRACES.status; TRACES.to_address; TRACES.trace_type; TRACES.value; TRANSACTIONS.block_hash; TRANSACTIONS.from_address; TRANSACTIONS.gas_price; TRANSACTIONS.receipt_gas_used; TRANSACTIONS.receipt_status,13,88,snow_sql_near_exact,sf_bq012 sf_bq017,GEO_OPENSTREETMAP,snowflake,"What are the five longest types of highways within the multipolygon boundary of Denmark (as defined by Wikidata ID 'Q35') by total length, analyzed through planet features?","WITH bounding_area AS ( SELECT ""geometry"" AS geometry FROM GEO_OPENSTREETMAP.GEO_OPENSTREETMAP.PLANET_FEATURES, @@ -851,7 +851,7 @@ FROM highway_info ORDER BY highway_length DESC -LIMIT 5;",PLANET_FEATURES.all_tags; PLANET_FEATURES.feature_type; PLANET_FEATURES.geometry,3,lite_sql,sf_bq017 +LIMIT 5;",PLANET_FEATURES.all_tags; PLANET_FEATURES.feature_type; PLANET_FEATURES.geometry,3,86,lite_sql,sf_bq017 bq018,covid19_open_data,bigquery,Which day in March and April had the highest COVID-19 confirmed case growth rate in the United States? The format is MM-DD.,"WITH us_cases_by_date AS ( SELECT date, @@ -883,7 +883,7 @@ FROM ORDER BY percentage_increase DESC -LIMIT 1",covid19_open_data.country_name; covid19_open_data.cumulative_confirmed; covid19_open_data.date,3,lite_sql,sf_bq018 +LIMIT 1",covid19_open_data.country_name; covid19_open_data.cumulative_confirmed; covid19_open_data.date,3,701,lite_sql,sf_bq018 bq021,new_york,bigquery,"For the top 20 Citi Bike routes in 2016, which route is faster than yellow taxis and among those, which one has the longest average bike duration? Please provide the start station name of this route. The coordinates are rounded to three decimals.","WITH top20route AS ( SELECT start_station_name, end_station_name, avg_bike_duration, avg_taxi_duration @@ -935,7 +935,7 @@ WHERE avg_bike_duration < avg_taxi_duration ORDER BY avg_bike_duration DESC -LIMIT 1",citibike_trips.end_station_latitude; citibike_trips.end_station_longitude; citibike_trips.end_station_name; citibike_trips.start_station_latitude; citibike_trips.start_station_longitude; citibike_trips.start_station_name; citibike_trips.starttime; citibike_trips.tripduration; tlc_yellow_trips_*.dropoff_datetime; tlc_yellow_trips_*.dropoff_latitude; tlc_yellow_trips_*.dropoff_longitude; tlc_yellow_trips_*.pickup_datetime; tlc_yellow_trips_*.pickup_latitude; tlc_yellow_trips_*.pickup_longitude,14,lite_sql,sf_bq021 +LIMIT 1",citibike_trips.end_station_latitude; citibike_trips.end_station_longitude; citibike_trips.end_station_name; citibike_trips.start_station_latitude; citibike_trips.start_station_longitude; citibike_trips.start_station_name; citibike_trips.starttime; citibike_trips.tripduration; tlc_yellow_trips_*.dropoff_datetime; tlc_yellow_trips_*.dropoff_latitude; tlc_yellow_trips_*.dropoff_longitude; tlc_yellow_trips_*.pickup_datetime; tlc_yellow_trips_*.pickup_latitude; tlc_yellow_trips_*.pickup_longitude,14,252,lite_sql,sf_bq021 bq022,chicago,bigquery,"Given the taxi trip data in Chicago, partition the trips that last no more than 1 hour into 6 quantiles based on trip duration. Please provide the minimum/maximum trip duration (rounded-off to integer minutes), total trips, and average fare for each quantile.","SELECT ROUND(MIN(trip_seconds) / 60, 0) AS min_minutes, ROUND(MAX(trip_seconds) / 60, 0) AS max_minutes, @@ -954,7 +954,7 @@ FROM ( GROUP BY quantile ORDER BY - min_minutes, max_minutes;",taxi_trips.fare; taxi_trips.trip_seconds,2,lite_sql,sf_bq022 + min_minutes, max_minutes;",taxi_trips.fare; taxi_trips.trip_seconds,2,45,lite_sql,sf_bq022 bq025,census_bureau_international,bigquery,"Provide a list of the top 10 countries for the year 2020, ordered by the highest percentage of their population under 20 years old. For each country, include the total population under 20 years old, the total midyear population, and the percentage of the population that is under 20 years old.","SELECT age.country_name, SUM(age.population) AS under_25, @@ -987,7 +987,7 @@ ORDER BY 4 DESC /* Remove limit for visualization */ LIMIT - 10",midyear_population.country_code; midyear_population.midyear_population; midyear_population.year; midyear_population_agespecific.age; midyear_population_agespecific.country_code; midyear_population_agespecific.country_name; midyear_population_agespecific.population; midyear_population_agespecific.year,8,lite_sql,sf_bq025 + 10",midyear_population.country_code; midyear_population.midyear_population; midyear_population.year; midyear_population_agespecific.age; midyear_population_agespecific.country_code; midyear_population_agespecific.country_name; midyear_population_agespecific.population; midyear_population_agespecific.year,8,165,lite_sql,sf_bq025 sf_bq028,DEPS_DEV_V1,snowflake,"Considering only the latest release versions of NPM package, which packages are the top 8 most popular based on the Github star number, as well as their versions?","WITH HighestReleases AS ( SELECT HR.""Name"", @@ -1038,7 +1038,7 @@ ON AND PVP.""ProjectName"" = P.""Name"" ORDER BY P.""StarsCount"" DESC -LIMIT 8;",PACKAGEVERSIONS.Name; PACKAGEVERSIONS.System; PACKAGEVERSIONS.Version; PACKAGEVERSIONS.VersionInfo; PACKAGEVERSIONTOPROJECT.Name; PACKAGEVERSIONTOPROJECT.ProjectName; PACKAGEVERSIONTOPROJECT.ProjectType; PACKAGEVERSIONTOPROJECT.System; PACKAGEVERSIONTOPROJECT.Version; PROJECTS.Name; PROJECTS.StarsCount; PROJECTS.Type,12,lite_sql,sf_bq028 +LIMIT 8;",PACKAGEVERSIONS.Name; PACKAGEVERSIONS.System; PACKAGEVERSIONS.Version; PACKAGEVERSIONS.VersionInfo; PACKAGEVERSIONTOPROJECT.Name; PACKAGEVERSIONTOPROJECT.ProjectName; PACKAGEVERSIONTOPROJECT.ProjectType; PACKAGEVERSIONTOPROJECT.System; PACKAGEVERSIONTOPROJECT.Version; PROJECTS.Name; PROJECTS.StarsCount; PROJECTS.Type,12,78,lite_sql,sf_bq028 bq031,noaa_data,bigquery,"Show me the daily weather data (temperature, precipitation, and wind speed) in Rochester for the first season of year 2019, converted to Celsius, centimeters, and meters per second, respectively. Also, include the moving averages (window size = 8) and the differences between the moving averages for up to 8 days prior (all values rounded to one decimal place, sorted by date in ascending order, and records starting from 2019-01-09).","WITH transrate AS ( SELECT DATE(CAST(year AS INT64), CAST(mo AS INT64), CAST(da AS INT64)) AS observation_date @@ -1165,7 +1165,7 @@ FROM lag_moving_avg WHERE lag8_temp_moving_avg IS NOT NULL ORDER BY observation_date; --- all result rounded to 1 decimal place",gsod_*.da; gsod_*.mo; gsod_*.prcp; gsod_*.stn; gsod_*.temp; gsod_*.wdsp; gsod_*.year; stations.name; stations.usaf,9,lite_sql,sf_bq031 +-- all result rounded to 1 decimal place",gsod_*.da; gsod_*.mo; gsod_*.prcp; gsod_*.stn; gsod_*.temp; gsod_*.wdsp; gsod_*.year; stations.name; stations.usaf,9,739,lite_sql,sf_bq031 bq032,noaa_data,bigquery,Can you provide the latitude of the final coordinates for the hurricane that traveled the second longest distance in the North Atlantic during 2020?,"WITH hurricane_geometry AS ( SELECT * EXCEPT (longitude, latitude), @@ -1221,7 +1221,7 @@ ORDER BY cumulative_distance DESC LIMIT 1 -;",hurricanes.basin; hurricanes.iso_time; hurricanes.latitude; hurricanes.longitude; hurricanes.name; hurricanes.season; hurricanes.sid; hurricanes.usa_wind,8,lite_sql,sf_bq032 +;",hurricanes.basin; hurricanes.iso_time; hurricanes.latitude; hurricanes.longitude; hurricanes.name; hurricanes.season; hurricanes.sid; hurricanes.usa_wind,8,739,lite_sql,sf_bq032 sf_bq033,PATENTS,snowflake,"How many U.S. publications related to IoT (where the abstract includes the phrase 'internet of things') were filed each month from 2008 to 2022, including months with no filings?","WITH Patent_Matches AS ( SELECT TO_DATE(CAST(ANY_VALUE(patentsdb.""filing_date"") AS STRING), 'YYYYMMDD') AS Patent_Filing_Date, @@ -1264,7 +1264,7 @@ WHERE GROUP BY TO_CHAR(Date_Series_Table.day, 'YYYY-MM') ORDER BY - Patent_Date_YearMonth;",PUBLICATIONS.abstract_localized; PUBLICATIONS.application_number; PUBLICATIONS.country_code; PUBLICATIONS.filing_date,4,lite_sql,sf_bq033 + Patent_Date_YearMonth;",PUBLICATIONS.abstract_localized; PUBLICATIONS.application_number; PUBLICATIONS.country_code; PUBLICATIONS.filing_date,4,79,lite_sql,sf_bq033 bq034,ghcn_d,bigquery,"I want to know the IDs, names of weather stations within a 50 km straight-line distance from the center of Chicago (41.8319°N, 87.6847°W)","WITH params AS ( SELECT ST_GeogPoint(-87.6847, 41.8319) AS center, 50 AS maxdist_km @@ -1294,7 +1294,7 @@ nearest_nstations AS ( FROM nearest_stations AS station, params ) -SELECT * from nearest_nstations",ghcnd_stations.id; ghcnd_stations.latitude; ghcnd_stations.longitude; ghcnd_stations.name; ghcnd_stations.state,5,lite_sql,sf_bq034 +SELECT * from nearest_nstations",ghcnd_stations.id; ghcnd_stations.latitude; ghcnd_stations.longitude; ghcnd_stations.name; ghcnd_stations.state,5,37,lite_sql,sf_bq034 bq035,san_francisco,bigquery,What is the total distance traveled by each bike in the San Francisco Bikeshare program? Use data from bikeshare trips and stations to calculate this.,"SELECT bike_number, AVG(dist_in_m) AS avg_dist_m, @@ -1328,7 +1328,7 @@ FROM ( ) ends ON ends.trip_id = starts.trip_id ) GROUP BY bike_number -ORDER BY total_dist_m DESC",bikeshare_stations.latitude; bikeshare_stations.longitude; bikeshare_stations.station_id; bikeshare_trips.bike_number; bikeshare_trips.end_station_id; bikeshare_trips.start_station_id; bikeshare_trips.trip_id,7,lite_sql,sf_bq035 +ORDER BY total_dist_m DESC",bikeshare_stations.latitude; bikeshare_stations.longitude; bikeshare_stations.station_id; bikeshare_trips.bike_number; bikeshare_trips.end_station_id; bikeshare_trips.start_station_id; bikeshare_trips.trip_id,7,118,lite_sql,sf_bq035 sf_bq037,HUMAN_GENOME_VARIANTS,snowflake,"About the refined human genetic variations collected in phase 3 on 2015-02-20, I want to know the minimum and maximum start positions as well as the proportions of these two respectively for reference bases 'AT' and 'TA'.","WITH A AS ( SELECT ""reference_bases"", @@ -1390,7 +1390,7 @@ LEFT JOIN LEFT JOIN max_counts ON B.""reference_bases"" = max_counts.""reference_bases"" AND B.""max_start_position"" = max_counts.""max_start_position"" ORDER BY - B.""reference_bases"";",_1000_GENOMES_PHASE_3_OPTIMIZED_SCHEMA_VARIANTS_20150220.reference_bases; _1000_GENOMES_PHASE_3_OPTIMIZED_SCHEMA_VARIANTS_20150220.start_position,2,snow_sql_near_exact,sf_bq037 + B.""reference_bases"";",_1000_GENOMES_PHASE_3_OPTIMIZED_SCHEMA_VARIANTS_20150220.reference_bases; _1000_GENOMES_PHASE_3_OPTIMIZED_SCHEMA_VARIANTS_20150220.start_position,2,202,snow_sql_near_exact,sf_bq037 bq039,new_york_plus,bigquery,"Which are the top 10 taxi trips in New York City from July 1 to July 7, 2016, with more than 5 passengers, a trip distance of at least 10 miles, and a positive fare, ranked by total fare amount? Display the pickup and dropoff zones, trip duration, driving speed in miles per hour, and tip rate. Note that you should avoid invalid items.","SELECT tz.zone_name AS pickup_zone, tz1.zone_name AS dropoff_zone, @@ -1422,7 +1422,7 @@ WHERE AND fare_amount >= 0 AND total_amount >= 0 ORDER BY total_amount DESC -LIMIT 10;",taxi_zone_geom.zone_id; taxi_zone_geom.zone_name; tlc_yellow_trips_*.dropoff_datetime; tlc_yellow_trips_*.dropoff_location_id; tlc_yellow_trips_*.fare_amount; tlc_yellow_trips_*.mta_tax; tlc_yellow_trips_*.passenger_count; tlc_yellow_trips_*.pickup_datetime; tlc_yellow_trips_*.pickup_location_id; tlc_yellow_trips_*.tip_amount; tlc_yellow_trips_*.tolls_amount; tlc_yellow_trips_*.total_amount; tlc_yellow_trips_*.trip_distance,13,lite_sql,sf_bq039 +LIMIT 10;",taxi_zone_geom.zone_id; taxi_zone_geom.zone_name; tlc_yellow_trips_*.dropoff_datetime; tlc_yellow_trips_*.dropoff_location_id; tlc_yellow_trips_*.fare_amount; tlc_yellow_trips_*.mta_tax; tlc_yellow_trips_*.passenger_count; tlc_yellow_trips_*.pickup_datetime; tlc_yellow_trips_*.pickup_location_id; tlc_yellow_trips_*.tip_amount; tlc_yellow_trips_*.tolls_amount; tlc_yellow_trips_*.total_amount; tlc_yellow_trips_*.trip_distance,13,360,lite_sql,sf_bq039 bq042,noaa_data,bigquery,"Help me analyze the weather conditions (including temperature, wind speed and precipitation) at NYC's airport LaGuardia for June 12, year over year, starting from 2011 to 2020.","SELECT -- Create a timestamp from the date components. TIMESTAMP(CONCAT(year,""-"",mo,""-"",da)) AS timestamp, @@ -1447,7 +1447,7 @@ WHERE GROUP BY timestamp ORDER BY - timestamp ASC;",gsod_*.da; gsod_*.mo; gsod_*.prcp; gsod_*.stn; gsod_*.temp; gsod_*.wdsp; gsod_*.year,7,lite_sql,sf_bq042 + timestamp ASC;",gsod_*.da; gsod_*.mo; gsod_*.prcp; gsod_*.stn; gsod_*.temp; gsod_*.wdsp; gsod_*.year,7,739,lite_sql,sf_bq042 sf_bq043,TCGA,snowflake,"What are the RNA expression levels of the genes MDM2, TP53, CDKN1A, and CCNE1, along with associated clinical information, in bladder cancer patients with CDKN2A mutations in the 'TCGA-BLCA' project? Use clinical data from the Genomic Data Commons Release 39, data about somatic mutations derived from the hg19 human genome reference in Feb 2017.","SELECT genex.""case_barcode"" AS ""case_barcode"", genex.""sample_barcode"" AS ""sample_barcode"", @@ -1494,7 +1494,7 @@ WHERE genex.""HGNC_gene_symbol"" IN ('MDM2', 'TP53', 'CDKN1A','CCNE1') ORDER BY ""case_barcode"", - ""HGNC_gene_symbol"";",SOMATIC_MUTATION_HG19_DCC_2017_02.Hugo_Symbol; SOMATIC_MUTATION_HG19_DCC_2017_02.case_barcode; SOMATIC_MUTATION_HG19_DCC_2017_02.project_short_name,3,lite_sql,sf_bq043 + ""HGNC_gene_symbol"";",SOMATIC_MUTATION_HG19_DCC_2017_02.Hugo_Symbol; SOMATIC_MUTATION_HG19_DCC_2017_02.case_barcode; SOMATIC_MUTATION_HG19_DCC_2017_02.project_short_name,3,1277,lite_sql,sf_bq043 bq045,noaa_data,bigquery,Which weather stations in Washington State had more than 150 rainy days in 2023 but fewer rainy days than in 2022? Define a 'rainy day' as any day where the precipitation recorded is more than 0 millimeters.,"WITH WashingtonStations2023 AS ( SELECT @@ -1579,7 +1579,7 @@ FROM prcp2023 JOIN prcp2022 on prcp2023.name = prcp2022.name WHERE prcp2023.rainy_days > 150 -AND prcp2023.rainy_days < prcp2022.rainy_days",gsod_*.prcp; gsod_*.stn; stations.name; stations.state; stations.usaf,5,lite_sql,sf_bq045 +AND prcp2023.rainy_days < prcp2022.rainy_days",gsod_*.prcp; gsod_*.stn; stations.name; stations.state; stations.usaf,5,739,lite_sql,sf_bq045 bq049,iowa_liquor_sales_plus,bigquery,"Display the monthly per capita Bourbon Whiskey sales in 2022 for the zip code with the third-highest total sales in Dubuque County, considering only the population aged 21 and over.","WITH DUBUQUE_LIQUOR_CTE AS ( SELECT CASE @@ -1671,7 +1671,7 @@ FROM MONTH_INFO t JOIN ranked_zip_codes r ON t.zip_code = r.zip_code WHERE r.rank = 3 -ORDER BY t.month;",population_by_zip_*.minimum_age; population_by_zip_*.population; population_by_zip_*.zipcode; sales.category_name; sales.county; sales.date; sales.sale_dollars; sales.zip_code,8,lite_sql,sf_bq049 +ORDER BY t.month;",population_by_zip_*.minimum_age; population_by_zip_*.population; population_by_zip_*.zipcode; sales.category_name; sales.county; sales.date; sales.sale_dollars; sales.zip_code,8,30,lite_sql,sf_bq049 sf_bq050,NEW_YORK_CITIBIKE_1,snowflake,"Help me look at the total number of bike trips, average trip duration (in minutes), average daily temperature, wind speed, and precipitation when trip starts (rounded to 1 decimal), as well as the month with the most trips (e.g., `4`), categorized by different starting and ending neighborhoods in New York City for the year 2014.","WITH data AS ( SELECT ""ZIPSTARTNAME"".""borough"" AS ""borough_start"", @@ -1769,7 +1769,7 @@ JOIN AND m.""row_num"" = 1 ORDER BY a.""neighborhood_start"", - a.""neighborhood_end"";",CITIBIKE_TRIPS.end_station_latitude; CITIBIKE_TRIPS.end_station_longitude; CITIBIKE_TRIPS.start_station_latitude; CITIBIKE_TRIPS.start_station_longitude; CITIBIKE_TRIPS.starttime; CITIBIKE_TRIPS.tripduration; GSOD_*.da; GSOD_*.mo; GSOD_*.prcp; GSOD_*.temp; GSOD_*.wban; GSOD_*.wdsp; GSOD_*.year; ZIP_CODES.borough; ZIP_CODES.neighborhood; ZIP_CODES.state_code; ZIP_CODES.zip; ZIP_CODES.zip_code; ZIP_CODES.zip_code_geom,19,snow_sql_near_exact,sf_bq050 + a.""neighborhood_end"";",CITIBIKE_TRIPS.end_station_latitude; CITIBIKE_TRIPS.end_station_longitude; CITIBIKE_TRIPS.start_station_latitude; CITIBIKE_TRIPS.start_station_longitude; CITIBIKE_TRIPS.starttime; CITIBIKE_TRIPS.tripduration; GSOD_*.da; GSOD_*.mo; GSOD_*.prcp; GSOD_*.temp; GSOD_*.wban; GSOD_*.wdsp; GSOD_*.year; ZIP_CODES.borough; ZIP_CODES.neighborhood; ZIP_CODES.state_code; ZIP_CODES.zip; ZIP_CODES.zip_code; ZIP_CODES.zip_code_geom,19,245,snow_sql_near_exact,sf_bq050 sf_bq052,PATENTSVIEW,snowflake,"I wonder which patents within CPC subsection 'C05' or group 'A01G' in the USA have at least one forward or backward citations within one month of their application dates. Give me the ids, titles, application date, forward/backward citation counts and summary texts.","SELECT app.""patent_id"" AS ""patent_id"", patent.""title"", @@ -1841,7 +1841,7 @@ JOIN ( OR cpc.""group_id"" = 'A01G' ) AS filterData ON app.""patent_id"" = filterData.""patent_id"" -ORDER BY app.""date"";",APPLICATION.country; APPLICATION.date; APPLICATION.patent_id; BRF_SUM_TEXT.patent_id; BRF_SUM_TEXT.text; CPC_CURRENT.group_id; CPC_CURRENT.patent_id; CPC_CURRENT.subsection_id; PATENT.id; PATENT.title; USPATENTCITATION.date; USPATENTCITATION.patent_id,12,lite_sql,sf_bq052 +ORDER BY app.""date"";",APPLICATION.country; APPLICATION.date; APPLICATION.patent_id; BRF_SUM_TEXT.patent_id; BRF_SUM_TEXT.text; CPC_CURRENT.group_id; CPC_CURRENT.patent_id; CPC_CURRENT.subsection_id; PATENT.id; PATENT.title; USPATENTCITATION.date; USPATENTCITATION.patent_id,12,304,lite_sql,sf_bq052 bq053,new_york,bigquery,"How has the number of trees of each fall color in New York City changed from 1995 to 2015, considering only trees that were still alive in 2015 and excluding those marked as dead in 1995?","SELECT c.fall_color, SUM(d.count_growth) AS change @@ -1889,7 +1889,7 @@ ON GROUP BY fall_color ORDER BY - change DESC",tree_census_1995.spc_latin; tree_census_1995.status; tree_census_2015.spc_common; tree_census_2015.spc_latin; tree_census_2015.status; tree_species.fall_color; tree_species.species_scientific_name,7,lite_sql,sf_bq053 + change DESC",tree_census_1995.spc_latin; tree_census_1995.status; tree_census_2015.spc_common; tree_census_2015.spc_latin; tree_census_2015.status; tree_species.fall_color; tree_species.species_scientific_name,7,252,lite_sql,sf_bq053 sf_bq057,CRYPTO,snowflake,"Which month (e.g., 3) in 2021 witnessed the highest percent of Bitcoin volume that took place in CoinJoin transactions? Also give me the percentage of CoinJoins transactions, the average input and output UTXOs ratio, and the proportion of CoinJoin transaction volume for that month (all 1 decimal).","WITH totals AS ( -- Aggregate monthly totals for Bitcoin txs, input/output UTXOs, -- and input/output values (UTXO stands for Unspent Transaction Output) @@ -1983,7 +1983,7 @@ FROM totals INNER JOIN coinjoins ON totals.tx_month = coinjoins.cjs_month ORDER BY value_percent DESC -LIMIT 1;",TRANSACTIONS.block_number; TRANSACTIONS.block_timestamp_month; TRANSACTIONS.hash; TRANSACTIONS.input_count; TRANSACTIONS.input_value; TRANSACTIONS.output_count; TRANSACTIONS.output_value; TRANSACTIONS.outputs,8,lite_sql,sf_bq057 +LIMIT 1;",TRANSACTIONS.block_number; TRANSACTIONS.block_timestamp_month; TRANSACTIONS.hash; TRANSACTIONS.input_count; TRANSACTIONS.input_value; TRANSACTIONS.output_count; TRANSACTIONS.output_value; TRANSACTIONS.outputs,8,286,lite_sql,sf_bq057 bq059,san_francisco_plus,bigquery,"What is the highest average speed (rounded to 1 decimal, in metric m/s) for bike trips in Berkeley with trip distance greater than 1000 meters?","WITH stations AS ( SELECT station_id FROM @@ -2014,7 +2014,7 @@ meta_data AS ( ) SELECT velocidade_media as max_velocity -FROM meta_data;",bikeshare_regions.name; bikeshare_regions.region_id; bikeshare_station_info.region_id; bikeshare_station_info.station_id; bikeshare_trips.duration_sec; bikeshare_trips.end_station_geom; bikeshare_trips.end_station_id; bikeshare_trips.end_station_latitude; bikeshare_trips.end_station_longitude; bikeshare_trips.start_station_geom; bikeshare_trips.start_station_id; bikeshare_trips.start_station_latitude; bikeshare_trips.start_station_longitude,13,lite_sql,sf_bq059 +FROM meta_data;",bikeshare_regions.name; bikeshare_regions.region_id; bikeshare_station_info.region_id; bikeshare_station_info.station_id; bikeshare_trips.duration_sec; bikeshare_trips.end_station_geom; bikeshare_trips.end_station_id; bikeshare_trips.end_station_latitude; bikeshare_trips.end_station_longitude; bikeshare_trips.start_station_geom; bikeshare_trips.start_station_id; bikeshare_trips.start_station_latitude; bikeshare_trips.start_station_longitude,13,278,lite_sql,sf_bq059 bq060,census_bureau_international,bigquery,Which top 3 countries had the highest net migration in 2017 among those with an area greater than 500 square kilometers? And what are their migration rates?,"WITH results AS ( SELECT growth.country_name, @@ -2046,7 +2046,7 @@ bq060,census_bureau_international,bigquery,Which top 3 countries had the highest LIMIT 3 ) SELECT country_name, net_migration -FROM results;",birth_death_growth_rates.country_code; birth_death_growth_rates.country_name; birth_death_growth_rates.net_migration; birth_death_growth_rates.year; country_names_area.country_area; country_names_area.country_code,6,lite_sql,sf_bq060 +FROM results;",birth_death_growth_rates.country_code; birth_death_growth_rates.country_name; birth_death_growth_rates.net_migration; birth_death_growth_rates.year; country_names_area.country_area; country_names_area.country_code,6,165,lite_sql,sf_bq060 bq061,census_bureau_acs_1,bigquery,Which census tract has witnessed the largest increase in median income between 2015 and 2018 in California? Tell me the tract code.,"WITH acs_2018 AS ( SELECT geo_id, @@ -2097,7 +2097,7 @@ FROM JOIN `bigquery-public-data.geo_census_tracts.census_tracts_california` AS tracts ON - max_geo_id.geo_id = tracts.geo_id;",census_tracts_california.geo_id; census_tracts_california.tract_ce; censustract_*.geo_id; censustract_*.median_income,4,lite_sql,sf_bq061 + max_geo_id.geo_id = tracts.geo_id;",census_tracts_california.geo_id; census_tracts_california.tract_ce; censustract_*.geo_id; censustract_*.median_income,4,4373,lite_sql,sf_bq061 bq064,census_bureau_acs_1,bigquery,"Could you calculate the population and average individual income (both rounded to 1 decimal) for each zip code based on U.S. census tract data in 2017? Only include those zip codes within a 5-mile radius of a specific geographic point (47.685833°N, -122.191667°W) in Washington and sort the results according to income in descending order.","WITH all_zip_tract_join AS ( SELECT zips.zip_code, @@ -2176,7 +2176,7 @@ join zip_pop_income stats on area.zip_code = stats.zip_code ORDER BY - average_income DESC;",censustract_*.geo_id; censustract_*.income_per_capita; censustract_*.total_pop; us_census_tracts_national.geo_id; us_census_tracts_national.tract_geom; zip_codes.state_code; zip_codes.zip_code; zip_codes.zip_code_geom,8,lite_sql,sf_bq064 + average_income DESC;",censustract_*.geo_id; censustract_*.income_per_capita; censustract_*.total_pop; us_census_tracts_national.geo_id; us_census_tracts_national.tract_geom; zip_codes.state_code; zip_codes.zip_code; zip_codes.zip_code_geom,8,4373,lite_sql,sf_bq064 bq066,sdoh,bigquery,"Could you assess the relationship between the poverty rates from the previous year's census data and the percentage of births without maternal morbidity for the years 2016 to 2018? Use only data for births where no maternal morbidity was reported and for each year, use the 5-year census data from the year before to compute the Pearson correlation coefficient","WITH poverty_and_natality AS ( SELECT EXTRACT(YEAR FROM n.Year) AS data_year, @@ -2236,7 +2236,7 @@ SELECT FROM poverty_and_natality GROUP BY - data_year",county_*.geo_id; county_*.pop_determined_poverty_status; county_*.poverty; county_natality_by_maternal_morbidity.Births; county_natality_by_maternal_morbidity.County_of_Residence_FIPS; county_natality_by_maternal_morbidity.Maternal_Morbidity_YN; county_natality_by_maternal_morbidity.Year,7,lite_sql,sf_bq066 + data_year",county_*.geo_id; county_*.pop_determined_poverty_status; county_*.poverty; county_natality_by_maternal_morbidity.Births; county_natality_by_maternal_morbidity.County_of_Residence_FIPS; county_natality_by_maternal_morbidity.Maternal_Morbidity_YN; county_natality_by_maternal_morbidity.Year,7,4068,lite_sql,sf_bq066 sf_bq068,CRYPTO,snowflake,What are the maximum and minimum balances across all addresses for different address types on Bitcoin Cash during March 2014?,"WITH double_entry_book AS ( -- debits SELECT @@ -2281,7 +2281,7 @@ SELECT max_balance, min_balance FROM max_min_balances -ORDER BY ""type"";",INPUTS.addresses; INPUTS.block_timestamp; INPUTS.type; INPUTS.value; OUTPUTS.addresses; OUTPUTS.block_timestamp; OUTPUTS.type; OUTPUTS.value,8,snow_sql_near_exact,sf_bq068 +ORDER BY ""type"";",INPUTS.addresses; INPUTS.block_timestamp; INPUTS.type; INPUTS.value; OUTPUTS.addresses; OUTPUTS.block_timestamp; OUTPUTS.type; OUTPUTS.value,8,286,snow_sql_near_exact,sf_bq068 sf_bq070,IDC,snowflake,Could you construct a structured clean dataset from `dicom_all` for me? It should retrieve digital slide microscopy (SM) images from the TCGA-LUAD and TCGA-LUSC datasets and meet the requirements in `dicom_dataset_selection.md`. The target labels are tissue type and cancer subtype.,"WITH sm_images AS ( SELECT @@ -2360,7 +2360,7 @@ WHERE AND (b.""tissue_type"" = 'normal' OR b.""tissue_type"" = 'tumor') AND (c.""item_name"" = 'Embedding medium' AND c.""item_value"" = 'Tissue freezing medium') ORDER BY - a.""crdc_instance_uuid"";",DICOM_ALL.ImageType; DICOM_ALL.Modality; DICOM_ALL.PatientID; DICOM_ALL.SeriesInstanceUID; DICOM_ALL.SpecimenDescriptionSequence; DICOM_ALL.StudyInstanceUID; DICOM_ALL.collection_id; DICOM_ALL.gcs_url,8,lite_sql,sf_bq070 + a.""crdc_instance_uuid"";",DICOM_ALL.ImageType; DICOM_ALL.Modality; DICOM_ALL.PatientID; DICOM_ALL.SeriesInstanceUID; DICOM_ALL.SpecimenDescriptionSequence; DICOM_ALL.StudyInstanceUID; DICOM_ALL.collection_id; DICOM_ALL.gcs_url,8,2100,lite_sql,sf_bq070 sf_bq072,DEATH,snowflake,"Please tell me the total and Black deaths due to vehicle-related incidents and firearms separately, for each age from 12 to 18.","WITH BlackRace AS ( SELECT CAST(""Code"" AS INT) AS CODE FROM DEATH.DEATH.RACE @@ -2416,7 +2416,7 @@ JOIN ( WHERE ""Age"" BETWEEN 12 AND 18 GROUP BY ""Age"" ) g -ON g.""Age"" = v.""Age"";",DEATHRECORDS.Age; DEATHRECORDS.Id; DEATHRECORDS.Race; ENTITYAXISCONDITIONS.DeathRecordId; ENTITYAXISCONDITIONS.Icd10Code; ICD10CODE.Code; ICD10CODE.Description; RACE.Code; RACE.Description,9,lite_sql,sf_bq072 +ON g.""Age"" = v.""Age"";",DEATHRECORDS.Age; DEATHRECORDS.Id; DEATHRECORDS.Race; ENTITYAXISCONDITIONS.DeathRecordId; ENTITYAXISCONDITIONS.Icd10Code; ICD10CODE.Code; ICD10CODE.Description; RACE.Code; RACE.Description,9,91,lite_sql,sf_bq072 bq074,sdoh,bigquery,"Count the number of counties that experienced an increase in unemployment from 2015 to 2018, using 5-year ACS data, and a decrease in dual-eligible enrollee counts between December 1, 2015, and December 1, 2018.","WITH acs_2018 AS ( SELECT geo_id, unemployed_pop AS unemployed_2018 FROM `bigquery-public-data.census_bureau_acs.county_2018_5yr` @@ -2470,7 +2470,7 @@ FROM corr_tbl WHERE u_change >0 AND -corr_tbl.total_duals_diff < 0",county_*.geo_id; county_*.unemployed_pop; dual_eligible_enrollment_by_county_and_program.County_Name; dual_eligible_enrollment_by_county_and_program.Date; dual_eligible_enrollment_by_county_and_program.FIPS; dual_eligible_enrollment_by_county_and_program.Public_Total,6,lite_sql,sf_bq074 +corr_tbl.total_duals_diff < 0",county_*.geo_id; county_*.unemployed_pop; dual_eligible_enrollment_by_county_and_program.County_Name; dual_eligible_enrollment_by_county_and_program.Date; dual_eligible_enrollment_by_county_and_program.FIPS; dual_eligible_enrollment_by_county_and_program.Public_Total,6,4068,lite_sql,sf_bq074 bq076,chicago,bigquery,Which month generally has the greatest number of motor vehicle thefts in 2016?,"SELECT incidents AS highest_monthly_thefts FROM ( @@ -2492,7 +2492,7 @@ WHERE ranking = 1 ORDER BY year DESC -LIMIT 1;",crime.date; crime.primary_type; crime.year,3,lite_sql,sf_bq076 +LIMIT 1;",crime.date; crime.primary_type; crime.year,3,45,lite_sql,sf_bq076 bq077,chicago,bigquery,"For each year from 2010 to 2016, what is the highest number of motor thefts in one month?","SELECT year, incidents @@ -2515,7 +2515,7 @@ FROM ( WHERE ranking = 1 ORDER BY - year ASC",crime.date; crime.primary_type; crime.year,3,lite_sql,sf_bq077 + year ASC",crime.date; crime.primary_type; crime.year,3,45,lite_sql,sf_bq077 bq078,open_targets_platform_2,bigquery,Retrieve the approved symbol of target genes with the highest overall score that are associated with the disease 'EFO_0000676' from the data source 'IMPC'.,"SELECT T1.targetId AS target_id, T1.datasourceId, @@ -2536,7 +2536,7 @@ WHERE ORDER BY overall_associations.score DESC LIMIT - 1;",associationByDatasourceDirect.datasourceId; associationByDatasourceDirect.targetId; associationByOverallDirect.diseaseId; associationByOverallDirect.score; associationByOverallDirect.targetId; targets.approvedSymbol; targets.id,7,lite_sql,sf_bq078 + 1;",associationByDatasourceDirect.datasourceId; associationByDatasourceDirect.targetId; associationByOverallDirect.diseaseId; associationByOverallDirect.score; associationByOverallDirect.targetId; targets.approvedSymbol; targets.id,7,351,lite_sql,sf_bq078 bq081,san_francisco_plus,bigquery,"Find the latest ride data for each region between 2014 and 2017. I want to know the name of each region, the trip ID of this ride, the ride duration, the start time, the starting station, and the gender of the rider.","SELECT t1.* FROM (SELECT Trips.trip_id TripId, @@ -2564,7 +2564,7 @@ bq081,san_francisco_plus,bigquery,"Find the latest ride data for each region bet AND Regions.name IS NOT NULL) GROUP BY RegionName) t2 - ON t1.RegionName = t2.RegionName AND t1.TripStartDate = t2.TripStartDate",bikeshare_regions.name; bikeshare_regions.region_id; bikeshare_station_info.region_id; bikeshare_station_info.station_id; bikeshare_trips.duration_sec; bikeshare_trips.member_gender; bikeshare_trips.start_date; bikeshare_trips.start_station_id; bikeshare_trips.start_station_name; bikeshare_trips.trip_id,10,lite_sql,sf_bq081 + ON t1.RegionName = t2.RegionName AND t1.TripStartDate = t2.TripStartDate",bikeshare_regions.name; bikeshare_regions.region_id; bikeshare_station_info.region_id; bikeshare_station_info.station_id; bikeshare_trips.duration_sec; bikeshare_trips.member_gender; bikeshare_trips.start_date; bikeshare_trips.start_station_id; bikeshare_trips.start_station_name; bikeshare_trips.trip_id,10,278,lite_sql,sf_bq081 sf_bq083,CRYPTO,snowflake,"What is the daily change in the total market value (formatted as a string in USD currency format) of the USDC token (with a target address of ""0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"") in 2023 , considering both Mint (the input starts with 0x42966c68) and Burn (the input starts with 0x40c10f19) transactions?","SELECT TO_DATE(TO_TIMESTAMP_NTZ(""block_timestamp"" / 1000000)) AS ""Date"", -- 将时间戳转换为日期格式,除以1000000 TO_CHAR(SUM( @@ -2589,7 +2589,7 @@ WHERE GROUP BY TO_DATE(TO_TIMESTAMP_NTZ(""block_timestamp"" / 1000000)) ORDER BY - ""Date"" DESC;",TRANSACTIONS.block_timestamp; TRANSACTIONS.input; TRANSACTIONS.to_address,3,snow_sql_near_exact,sf_bq083 + ""Date"" DESC;",TRANSACTIONS.block_timestamp; TRANSACTIONS.input; TRANSACTIONS.to_address,3,286,snow_sql_near_exact,sf_bq083 bq085,covid19_jhu_world_bank,bigquery,"Could you provide the total number of confirmed COVID-19 cases and the number of cases per 100,000 people, based on the 2020 population, on April 20, 2020, for the US, France, China, Italy, Spain, Germany, and Iran?","SELECT c.country, c.total_confirmed_cases, @@ -2627,7 +2627,7 @@ JOIN ON c.country = p.country ORDER BY - cases_per_100k DESC",indicators_data.country_name; indicators_data.indicator_code; indicators_data.value; indicators_data.year; summary.confirmed; summary.country_region; summary.date,7,lite_sql,sf_bq085 + cases_per_100k DESC",indicators_data.country_name; indicators_data.indicator_code; indicators_data.value; indicators_data.year; summary.confirmed; summary.country_region; summary.date,7,3609,lite_sql,sf_bq085 bq086,covid19_open_world_bank,bigquery,"What percentage of each country’s population was confirmed to have COVID-19 as of June 30, 2020?","WITH country_pop AS ( SELECT @@ -2651,7 +2651,7 @@ WHERE date = '2020-06-30' AND aggregation_level = 0 ORDER BY - case_percent DESC",covid19_open_data.aggregation_level; covid19_open_data.country_code; covid19_open_data.country_name; covid19_open_data.cumulative_confirmed; covid19_open_data.date; covid19_open_data.iso_3166_1_alpha_3; population_by_country.country_code; population_by_country.year_2018,8,lite_sql,sf_bq086 + case_percent DESC",covid19_open_data.aggregation_level; covid19_open_data.country_code; covid19_open_data.country_name; covid19_open_data.cumulative_confirmed; covid19_open_data.date; covid19_open_data.iso_3166_1_alpha_3; population_by_country.country_code; population_by_country.year_2018,8,853,lite_sql,sf_bq086 bq087,covid19_symptom_search,bigquery,Can you assess the collective percentage change in average search frequency for Anosmia symptoms across the five major boroughs of New York City from 2019 to 2020?,"SELECT table_2019.avg_symptom_Anosmia_2019, table_2020.avg_symptom_Anosmia_2020, @@ -2677,7 +2677,7 @@ FROM ( AND sub_region_2 IN (""Bronx County"", ""Queens County"", ""Kings County"", ""New York County"", ""Richmond County"") AND date >= '2019-01-01' AND date < '2020-01-01' -) AS table_2019",symptom_search_sub_region_2_weekly.date; symptom_search_sub_region_2_weekly.sub_region_1; symptom_search_sub_region_2_weekly.sub_region_2; symptom_search_sub_region_2_weekly.symptom_anosmia,4,lite_sql,sf_bq087 +) AS table_2019",symptom_search_sub_region_2_weekly.date; symptom_search_sub_region_2_weekly.sub_region_1; symptom_search_sub_region_2_weekly.sub_region_2; symptom_search_sub_region_2_weekly.symptom_anosmia,4,1722,lite_sql,sf_bq087 bq088,covid19_symptom_search,bigquery,"Can you provide the average levels of anxiety and depression symptoms from the weekly country data in the United States for the years 2019 and 2020, and calculate the percentage increase in these symptoms from 2019 to 2020?","SELECT table_2019.avg_symptom_Anxiety_2019, table_2020.avg_symptom_Anxiety_2020, @@ -2704,7 +2704,7 @@ FROM ( WHERE country_region_code = ""US"" AND date >= '2019-01-01' - AND date <'2020-01-01') AS table_2019",symptom_search_country_*.country_region_code; symptom_search_country_*.date; symptom_search_country_*.symptom_anxiety; symptom_search_country_*.symptom_depression,4,lite_sql,sf_bq088 + AND date <'2020-01-01') AS table_2019",symptom_search_country_*.country_region_code; symptom_search_country_*.date; symptom_search_country_*.symptom_anxiety; symptom_search_country_*.symptom_depression,4,1722,lite_sql,sf_bq088 bq089,covid19_usa,bigquery,"Given the latest population estimates from the 2018 five-year American Community Survey, what is the number of vaccine sites per 1000 people for counties in California?","WITH num_vaccine_sites_per_county AS ( SELECT @@ -2742,7 +2742,7 @@ USING ORDER BY sites_per_1k_ppl ASC LIMIT - 100;",censustract_*.geo_id; censustract_*.total_pop; facility_boundary_us_*.facility_place_id; facility_boundary_us_*.facility_sub_region_1; facility_boundary_us_*.facility_sub_region_2; facility_boundary_us_*.facility_sub_region_2_code,6,lite_sql,sf_bq089 + 100;",censustract_*.geo_id; censustract_*.total_pop; facility_boundary_us_*.facility_place_id; facility_boundary_us_*.facility_sub_region_1; facility_boundary_us_*.facility_sub_region_2; facility_boundary_us_*.facility_sub_region_2_code,6,6066,lite_sql,sf_bq089 bq090,CYMBAL_INVESTMENTS,bigquery,How much higher the average intrinsic value is for trades using the feeling-lucky strategy compared to those using the momentum strategy under long-side trades?,"WITH MomentumTrades AS ( SELECT StrikePrice - LastPx AS priceDifference @@ -2767,7 +2767,7 @@ SELECT AVG(FeelingLuckyTrades.priceDifference) - AVG(MomentumTrades.priceDifference) AS averageDifference FROM MomentumTrades, - FeelingLuckyTrades",trade_capture_report.LastPx; trade_capture_report.Sides; trade_capture_report.StrikePrice; trade_capture_report.TargetCompID,4,lite_sql,sf_bq090 + FeelingLuckyTrades",trade_capture_report.LastPx; trade_capture_report.Sides; trade_capture_report.StrikePrice; trade_capture_report.TargetCompID,4,14,lite_sql,sf_bq090 sf_bq091,PATENTS,snowflake,In which year did the assignee with the most applications in the patent category 'A61' file the most?,"WITH AA AS ( SELECT FIRST_VALUE(""assignee_harmonized"") OVER (PARTITION BY ""application_number"" ORDER BY ""application_number"") AS assignee_harmonized, @@ -2829,7 +2829,7 @@ MaxYearForTopAssignee AS ( SELECT filing_year FROM - MaxYearForTopAssignee",PUBLICATIONS.application_number; PUBLICATIONS.assignee_harmonized; PUBLICATIONS.cpc; PUBLICATIONS.filing_date,4,lite_sql,sf_bq091 + MaxYearForTopAssignee",PUBLICATIONS.application_number; PUBLICATIONS.assignee_harmonized; PUBLICATIONS.cpc; PUBLICATIONS.filing_date,4,79,lite_sql,sf_bq091 sf_bq093,CRYPTO,snowflake,"Tell me the maximum and minimum net changes in balances for Ethereum Classic addresses on October 14, 2016, considering debits, credits, and gas fees, while excluding internal calls like 'delegatecall', 'callcode', and 'staticcall'.","WITH double_entry_book AS ( -- Debits SELECT @@ -2897,7 +2897,7 @@ SELECT MAX(""net_change"") AS ""max_net_change"", MIN(""net_change"") AS ""min_net_change"" FROM - net_changes;",BLOCKS.miner; BLOCKS.number; TRANSACTIONS.block_number; TRANSACTIONS.block_timestamp; TRANSACTIONS.from_address; TRANSACTIONS.gas_price; TRANSACTIONS.hash; TRANSACTIONS.receipt_contract_address; TRANSACTIONS.receipt_gas_used; TRANSACTIONS.receipt_status; TRANSACTIONS.to_address; TRANSACTIONS.value,12,snow_sql_near_exact,sf_bq093 + net_changes;",BLOCKS.miner; BLOCKS.number; TRANSACTIONS.block_number; TRANSACTIONS.block_timestamp; TRANSACTIONS.from_address; TRANSACTIONS.gas_price; TRANSACTIONS.hash; TRANSACTIONS.receipt_contract_address; TRANSACTIONS.receipt_gas_used; TRANSACTIONS.receipt_status; TRANSACTIONS.to_address; TRANSACTIONS.value,12,286,snow_sql_near_exact,sf_bq093 bq095,open_targets_platform_1,bigquery,"Generate a list of drugs from the table containing molecular details that have completed clinical trials for pancreatic endocrine carcinoma, disease ID EFO_0007416. Please include each drug's name, the target approved symbol, and links to the relevant clinical trials.","SELECT targets.approvedSymbol AS target_symbol, drugs.name AS drug_name, @@ -2916,7 +2916,7 @@ ON WHERE datasourceId=""chembl"" AND diseaseId=""EFO_0007416"" - AND evidence.clinicalStatus = ""Completed""",evidence.clinicalStatus; evidence.datasourceId; evidence.diseaseId; evidence.drugId; evidence.targetId; evidence.urls; molecule.id; molecule.name; targets.approvedSymbol; targets.id,10,lite_sql,sf_bq095 + AND evidence.clinicalStatus = ""Completed""",evidence.clinicalStatus; evidence.datasourceId; evidence.diseaseId; evidence.drugId; evidence.targetId; evidence.urls; molecule.id; molecule.name; targets.approvedSymbol; targets.id,10,332,lite_sql,sf_bq095 bq096,gbif,bigquery,Which year had the first day after January with more than 10 sightings of Sterna paradisaea north of 40 degrees latitude?,"WITH tenplus AS ( SELECT year, @@ -2944,7 +2944,7 @@ GROUP BY year ORDER BY MIN(dayofyear) -LIMIT 1;",occurrences.decimallatitude; occurrences.eventdate; occurrences.month; occurrences.species; occurrences.year,5,lite_sql,sf_bq096 +LIMIT 1;",occurrences.decimallatitude; occurrences.eventdate; occurrences.month; occurrences.species; occurrences.year,5,50,lite_sql,sf_bq096 bq097,sdoh,bigquery,"What is the increasing amount of the average earnings per job between the years 2012 and 2017 for each geographic region in Massachusetts (indicated by ""MA"" at the end of GeoName)?","WITH bea_2012 AS ( SELECT GeoFIPS, GeoName, Earnings_per_job_avg AS earnings_2012 FROM `bigquery-public-data.sdoh_bea_cainc30.fips` @@ -2966,7 +2966,7 @@ earnings_diff AS ( ON bea_2017.GeoFIPS = bea_2012.GeoFIPS ) -SELECT * FROM earnings_diff WHERE earnings_change IS NOT NULL ORDER BY earnings_change DESC",fips.Earnings_per_job_avg; fips.GeoFIPS; fips.GeoName; fips.Year,4,lite_sql,sf_bq097 +SELECT * FROM earnings_diff WHERE earnings_change IS NOT NULL ORDER BY earnings_change DESC",fips.Earnings_per_job_avg; fips.GeoFIPS; fips.GeoName; fips.Year,4,4068,lite_sql,sf_bq097 bq098,new_york_plus,bigquery,"For NYC yellow taxi trips between January 1-7, 2016, could you tell me the percentage of no tips in each borough. Ensure trips where the dropoff occurs after the pickup, the passenger count is greater than 0, and trip distance, tip, tolls, MTA tax, fare, and total amount are non-negative.","WITH t2 AS ( SELECT @@ -3052,7 +3052,7 @@ SELECT (SUM(CASE WHEN tip_category = 'no tip' THEN no_of_trips ELSE 0 END) * 100.0 / SUM(no_of_trips)) AS percentage_no_tip FROM t3 GROUP BY pickup_borough -ORDER BY pickup_borough;",taxi_zone_geom.borough; taxi_zone_geom.zone_id; tlc_yellow_trips_*.dropoff_datetime; tlc_yellow_trips_*.fare_amount; tlc_yellow_trips_*.mta_tax; tlc_yellow_trips_*.passenger_count; tlc_yellow_trips_*.pickup_datetime; tlc_yellow_trips_*.pickup_location_id; tlc_yellow_trips_*.tip_amount; tlc_yellow_trips_*.tolls_amount; tlc_yellow_trips_*.total_amount; tlc_yellow_trips_*.trip_distance,12,lite_sql,sf_bq098 +ORDER BY pickup_borough;",taxi_zone_geom.borough; taxi_zone_geom.zone_id; tlc_yellow_trips_*.dropoff_datetime; tlc_yellow_trips_*.fare_amount; tlc_yellow_trips_*.mta_tax; tlc_yellow_trips_*.passenger_count; tlc_yellow_trips_*.pickup_datetime; tlc_yellow_trips_*.pickup_location_id; tlc_yellow_trips_*.tip_amount; tlc_yellow_trips_*.tolls_amount; tlc_yellow_trips_*.total_amount; tlc_yellow_trips_*.trip_distance,12,360,lite_sql,sf_bq098 sf_bq099,PATENTS,snowflake,"For patent class A01B3, I want to analyze the information of the top 3 assignees based on the total number of applications. Please provide the following five pieces of information: the name of this assignee, total number of applications, the year with the most applications, the number of applications in that year, and the country code with the most applications during that year.","WITH PatentApplications AS ( SELECT ""assignee_harmonized"" AS assignee_harmonized, @@ -3125,7 +3125,7 @@ FROM ( WHERE rn = 1 ORDER BY total_count DESC -LIMIT 3",PUBLICATIONS.application_number; PUBLICATIONS.assignee_harmonized; PUBLICATIONS.country_code; PUBLICATIONS.cpc; PUBLICATIONS.filing_date,5,snow_sql_near_exact,sf_bq099 +LIMIT 3",PUBLICATIONS.application_number; PUBLICATIONS.assignee_harmonized; PUBLICATIONS.country_code; PUBLICATIONS.cpc; PUBLICATIONS.filing_date,5,79,snow_sql_near_exact,sf_bq099 bq102,gnomAD,bigquery,"Identify which start positions are associated with missense variants in the BRCA1 gene on chromosome 17, where the reference base is 'C' and the alternate base is 'T'. Using data from the gnomAD v2.1.1 version.","WITH gene_region AS ( SELECT MIN(start_position) AS start_pos, @@ -3153,7 +3153,7 @@ WHERE main_table.start_position >= gene_region.start_pos AND main_table.start_position <= gene_region.end_pos AND REGEXP_CONTAINS(vep.Consequence, r""missense_variant"") AND reference_bases = ""C"" - AND alternate_bases.alt = ""T""",v2_1_1_genomes__chr_*.alternate_bases; v2_1_1_genomes__chr_*.end_position; v2_1_1_genomes__chr_*.reference_bases; v2_1_1_genomes__chr_*.start_position,4,lite_sql,sf_bq102 + AND alternate_bases.alt = ""T""",v2_1_1_genomes__chr_*.alternate_bases; v2_1_1_genomes__chr_*.end_position; v2_1_1_genomes__chr_*.reference_bases; v2_1_1_genomes__chr_*.start_position,4,1150,lite_sql,sf_bq102 bq103,gnomAD,bigquery,"Generate summary statistics on genetic variants in the region between positions 55039447 and 55064852 on chromosome 1. This includes the number of variants, the total allele count, the total number of alleles, and distinct gene symbols (using Variant Effect Predictor, VEP, for gene annotation). Additionally, compute the density of mutations by dividing the length of the region by the number of variants. Using data from the gnomAD v3 version.","WITH summary_stats AS ( SELECT COUNT(1) AS num_variants, @@ -3168,7 +3168,7 @@ bq103,gnomAD,bigquery,"Generate summary statistics on genetic variants in the re SELECT ROUND((55064852 - 55039447) / num_variants, 3) AS burden_of_mutation, * -FROM summary_stats;",v3_genomes__chr_*.AN; v3_genomes__chr_*.alternate_bases; v3_genomes__chr_*.start_position,3,lite_sql,sf_bq103 +FROM summary_stats;",v3_genomes__chr_*.AN; v3_genomes__chr_*.alternate_bases; v3_genomes__chr_*.start_position,3,1150,lite_sql,sf_bq103 sf_bq104,GOOGLE_TRENDS,snowflake,Identify which DMA had the highest search scores for the terms that were top rising one year ago,"WITH LatestWeek AS ( SELECT DATEADD(WEEK, -52, MAX(""week"")) AS ""last_year_week"" @@ -3207,7 +3207,7 @@ WHERE rn = 1 ORDER BY ""rank"" -LIMIT 1;",TOP_RISING_TERMS.dma_name; TOP_RISING_TERMS.rank; TOP_RISING_TERMS.refresh_date; TOP_RISING_TERMS.score; TOP_RISING_TERMS.term; TOP_RISING_TERMS.week,6,lite_sql,sf_bq104 +LIMIT 1;",TOP_RISING_TERMS.dma_name; TOP_RISING_TERMS.rank; TOP_RISING_TERMS.refresh_date; TOP_RISING_TERMS.score; TOP_RISING_TERMS.term; TOP_RISING_TERMS.week,6,34,lite_sql,sf_bq104 bq105,nhtsa_traffic_fatalities_plus,bigquery,"How many traffic accidents per 100,000 people, specifically due to driver distraction, were recorded in each state in the years 2015 and 2016? Identify the top five states each year with the highest rates. Exclude accidents where the distraction status of the driver was recorded as 'Not Distracted,' 'Unknown if Distracted,' or 'Not Reported.' Use state population data from the 2010 census for calculating the rate.","SELECT * FROM ( SELECT @@ -3283,7 +3283,7 @@ GROUP BY ORDER BY rate_per_100000 DESC LIMIT 5 -)",accident_*.consecutive_number; accident_*.state_name; distract_2015.consecutive_number; distract_2015.driver_distracted_by_name; population_by_zip_*.population; population_by_zip_*.zipcode; zipcode_area.state_name; zipcode_area.zipcode,8,lite_sql,sf_bq105 +)",accident_*.consecutive_number; accident_*.state_name; distract_2015.consecutive_number; distract_2015.driver_distracted_by_name; population_by_zip_*.population; population_by_zip_*.zipcode; zipcode_area.state_name; zipcode_area.zipcode,8,813,lite_sql,sf_bq105 bq109,open_targets_genetics_1,bigquery,"Find the average, variance, max-min difference, and the QTL source(right study) of the maximum log2(h4/h3) for data where right gene id is ""ENSG00000169174"", h4 > 0.8, h3 < 0.02, reported trait includes ""lesterol levels"", right biological feature is ""IPSC"", and the variant is '1_55029009_C_T'.","WITH coloc_stats AS ( SELECT coloc.coloc_log2_h4_h3, @@ -3315,7 +3315,7 @@ SELECT MAX(coloc_log2_h4_h3) - MIN(coloc_log2_h4_h3) AS max_min_difference, (SELECT qtl_source FROM coloc_stats WHERE coloc_log2_h4_h3 = (SELECT max_log2_h4_h3 FROM max_value)) AS qtl_source_of_max FROM - coloc_stats;",studies.study_id; studies.trait_reported; variant_disease_coloc.coloc_h3; variant_disease_coloc.coloc_h4; variant_disease_coloc.coloc_log2_h4_h3; variant_disease_coloc.left_alt; variant_disease_coloc.left_chrom; variant_disease_coloc.left_pos; variant_disease_coloc.left_ref; variant_disease_coloc.left_study; variant_disease_coloc.right_bio_feature; variant_disease_coloc.right_gene_id; variant_disease_coloc.right_study,13,lite_sql,sf_bq109 + coloc_stats;",studies.study_id; studies.trait_reported; variant_disease_coloc.coloc_h3; variant_disease_coloc.coloc_h4; variant_disease_coloc.coloc_log2_h4_h3; variant_disease_coloc.left_alt; variant_disease_coloc.left_chrom; variant_disease_coloc.left_pos; variant_disease_coloc.left_ref; variant_disease_coloc.left_study; variant_disease_coloc.right_bio_feature; variant_disease_coloc.right_gene_id; variant_disease_coloc.right_study,13,293,lite_sql,sf_bq109 bq110,sdoh,bigquery,What has been the change in the number of homeless veterans in each CoC region of New York between 2012 and 2018?,"WITH homeless_2012 AS ( SELECT Homeless_Veterans AS Vet12, CoC_Name FROM `bigquery-public-data.sdoh_hud_pit_homelessness.hud_pit_by_coc` @@ -3336,7 +3336,7 @@ veterans_change AS ( ) SELECT COC_Name, VetChange FROM veterans_change -ORDER BY CoC_Name;",hud_pit_by_coc.CoC_Name; hud_pit_by_coc.CoC_Number; hud_pit_by_coc.Count_Year; hud_pit_by_coc.Homeless_Veterans,4,lite_sql,sf_bq110 +ORDER BY CoC_Name;",hud_pit_by_coc.CoC_Name; hud_pit_by_coc.CoC_Number; hud_pit_by_coc.Count_Year; hud_pit_by_coc.Homeless_Veterans,4,4068,lite_sql,sf_bq110 bq112,bls,bigquery,"Did the increase on average annual wages for all industries in Allegheny County, Pittsburgh keep pace with inflation of all consumer items between 1998 and 2017? Tell me their growth rates respectively (2 decimals).","WITH geo AS ( SELECT DISTINCT geo_id FROM `bigquery-public-data.geo_us_boundaries.counties` @@ -3401,7 +3401,7 @@ FROM avg_wage_2017, avg_wage_1998, avg_cpi_2017, - avg_cpi_1998",1998_q_*.avg_wkly_wage_10_total_all_industries; 1998_q_*.geoid; 2017_q_*.avg_wkly_wage_10_total_all_industries; 2017_q_*.geoid; counties.county_name; counties.geo_id; cpi_u.area_code; cpi_u.area_name; cpi_u.item_code; cpi_u.item_name; cpi_u.value; cpi_u.year,12,lite_sql,sf_bq112 + avg_cpi_1998",1998_q_*.avg_wkly_wage_10_total_all_industries; 1998_q_*.geoid; 2017_q_*.avg_wkly_wage_10_total_all_industries; 2017_q_*.geoid; counties.county_name; counties.geo_id; cpi_u.area_code; cpi_u.area_name; cpi_u.item_code; cpi_u.item_name; cpi_u.value; cpi_u.year,12,492,lite_sql,sf_bq112 bq113,bls,bigquery,Which Utah county has witnessed the greatest percentage increase of construction jobs from 2000 to 2018? And what is the corresponding increase rate?,"WITH utah_code AS ( SELECT DISTINCT geo_id FROM bigquery-public-data.geo_us_boundaries.states @@ -3442,7 +3442,7 @@ WHERE c.state_fips_code = (SELECT geo_id FROM utah_code) ORDER BY increase_rate desc -LIMIT 1",2000_q_*.geoid; 2000_q_*.month3_emplvl_23_construction; 2018_q_*.geoid; 2018_q_*.month3_emplvl_23_construction; counties.county_name; counties.geo_id; counties.state_fips_code; states.geo_id; states.state_name,9,lite_sql,sf_bq113 +LIMIT 1",2000_q_*.geoid; 2000_q_*.month3_emplvl_23_construction; 2018_q_*.geoid; 2018_q_*.month3_emplvl_23_construction; counties.county_name; counties.geo_id; counties.state_fips_code; states.geo_id; states.state_name,9,492,lite_sql,sf_bq113 bq114,openaq,bigquery,"What are the top three cities where the difference between the PM2.5 measurements in 1990 from the EPA and in 2020 from OpenAQ is the greatest, given that the locations are matched with latitude and longitude rounded to two decimal places?","SELECT aq.city, epa.arithmetic_mean, @@ -3464,7 +3464,7 @@ WHERE AND EXTRACT(YEAR FROM aq.timestamp) = 2020 ORDER BY (epa.arithmetic_mean - aq.value) DESC -LIMIT 3",air_quality_annual_summary.arithmetic_mean; air_quality_annual_summary.latitude; air_quality_annual_summary.longitude; air_quality_annual_summary.parameter_name; air_quality_annual_summary.units_of_measure; air_quality_annual_summary.year; global_air_quality.city; global_air_quality.latitude; global_air_quality.longitude; global_air_quality.pollutant; global_air_quality.timestamp; global_air_quality.value,12,lite_sql,sf_bq114 +LIMIT 3",air_quality_annual_summary.arithmetic_mean; air_quality_annual_summary.latitude; air_quality_annual_summary.longitude; air_quality_annual_summary.parameter_name; air_quality_annual_summary.units_of_measure; air_quality_annual_summary.year; global_air_quality.city; global_air_quality.latitude; global_air_quality.longitude; global_air_quality.pollutant; global_air_quality.timestamp; global_air_quality.value,12,891,lite_sql,sf_bq114 bq115,census_bureau_international,bigquery,Which country has the highest percentage of population under the age of 25 in 2017?,"SELECT country_name FROM @@ -3500,7 +3500,7 @@ ORDER BY 4 DESC ) LIMIT -1",midyear_population.country_code; midyear_population.midyear_population; midyear_population.year; midyear_population_agespecific.age; midyear_population_agespecific.country_code; midyear_population_agespecific.country_name; midyear_population_agespecific.population; midyear_population_agespecific.year,8,lite_sql,sf_bq115 +1",midyear_population.country_code; midyear_population.midyear_population; midyear_population.year; midyear_population_agespecific.age; midyear_population_agespecific.country_code; midyear_population_agespecific.country_name; midyear_population_agespecific.population; midyear_population_agespecific.year,8,165,lite_sql,sf_bq115 bq119,noaa_data,bigquery,"Please show information of the hurricane with the third longest total travel distance in the North Atlantic during 2020, including its travel coordinates, the cumulative travel distance at each point, and the maximum sustained wind speed at those times.","WITH hurricane_geometry AS ( SELECT * EXCEPT (longitude, latitude), @@ -3552,7 +3552,7 @@ FROM WHERE dense_rank = 3 ORDER BY -cumulative_distance;",hurricanes.basin; hurricanes.iso_time; hurricanes.latitude; hurricanes.longitude; hurricanes.name; hurricanes.season; hurricanes.sid; hurricanes.usa_wind,8,lite_sql,sf_bq119 +cumulative_distance;",hurricanes.basin; hurricanes.iso_time; hurricanes.latitude; hurricanes.longitude; hurricanes.name; hurricanes.season; hurricanes.sid; hurricanes.usa_wind,8,739,lite_sql,sf_bq119 bq120,sdoh,bigquery,"What are the top 10 regions with the highest total SNAP participation, along with their respective ratios of households earning under $20,000 to SNAP households, as of 2017?","WITH acs_2017 AS ( SELECT geo_id, income_less_10000 AS i10, income_10000_14999 AS i15, income_15000_19999 AS i20 FROM `bigquery-public-data.census_bureau_acs.county_2017_5yr` @@ -3572,7 +3572,7 @@ JOIN snap_2017_Jan ON acs_2017.geo_id = snap_2017_Jan.FIPS WHERE snap_2017_Jan.snap_total > 0 ORDER BY snap_2017_Jan.snap_total DESC -LIMIT 10",county_*.geo_id; county_*.income_10000_14999; county_*.income_15000_19999; county_*.income_less_10000; snap_enrollment.Date; snap_enrollment.FIPS; snap_enrollment.SNAP_All_Participation_Households,7,lite_sql,sf_bq120 +LIMIT 10",county_*.geo_id; county_*.income_10000_14999; county_*.income_15000_19999; county_*.income_less_10000; snap_enrollment.Date; snap_enrollment.FIPS; snap_enrollment.SNAP_All_Participation_Households,7,4068,lite_sql,sf_bq120 sf_bq121,STACKOVERFLOW,snowflake,"How do the average reputation and number of badges vary among Stack Overflow users based on the number of complete years they have been members, considering only those who joined on or before October 1, 2021?","WITH sub AS ( SELECT ""users"".""id"", @@ -3593,7 +3593,7 @@ SELECT AVG(""num_badges"") AS ""Avg_Num_Badges"" FROM sub GROUP BY ""user_tenure"" -ORDER BY ""user_tenure"";",BADGES.user_id; USERS.creation_date; USERS.id; USERS.reputation,4,snow_sql_near_exact,sf_bq121 +ORDER BY ""user_tenure"";",BADGES.user_id; USERS.creation_date; USERS.id; USERS.reputation,4,228,snow_sql_near_exact,sf_bq121 bq123,stackoverflow,bigquery,Which day of the week has the third highest percentage of questions answered within an hour? Please tell me the day along with the percentage.,"WITH first_answers AS ( SELECT parent_id AS question_id, @@ -3617,7 +3617,7 @@ GROUP BY question_day ORDER BY percent_questions DESC -LIMIT 1 OFFSET 2",posts_answers.creation_date; posts_answers.parent_id; posts_questions.creation_date; posts_questions.id,4,lite_sql,sf_bq123 +LIMIT 1 OFFSET 2",posts_answers.creation_date; posts_answers.parent_id; posts_questions.creation_date; posts_questions.id,4,228,lite_sql,sf_bq123 bq124,fhir_synthea,bigquery,"Can you identify how many alive patients, currently managing chronic conditions such as diabetes or hypertension, are prescribed seven or more medications?","With INFO AS ( SELECT MR.patientId, @@ -3666,7 +3666,7 @@ GROUP BY patientId, last_name, first_name, Condition.Codes, Condition.Conditions ORDER BY last_name ) -SELECT COUNT(*) FROM INFO",condition.code; condition.subject; medication_request.status; medication_request.subject; patient.deceased; patient.id; patient.name,7,lite_sql,sf_bq124 +SELECT COUNT(*) FROM INFO",condition.code; condition.subject; medication_request.status; medication_request.subject; patient.deceased; patient.id; patient.name,7,456,lite_sql,sf_bq124 bq126,the_met,bigquery,"What are the titles, artist names, mediums, and original image URLs of objects with 'Photograph' in their names from the 'Photographs' department, created not by an unknown artist, with an object end date of 1839 or earlier?","SELECT o.artist_display_name, o.title, @@ -3699,7 +3699,7 @@ ON o.object_id = i.object_id ORDER BY o.object_end_date -;",images.object_id; images.original_image_url; objects.artist_display_name; objects.department; objects.medium; objects.object_end_date; objects.object_id; objects.object_name; objects.title,9,lite_sql,sf_bq126 +;",images.object_id; images.original_image_url; objects.artist_display_name; objects.department; objects.medium; objects.object_end_date; objects.object_id; objects.object_name; objects.title,9,61,lite_sql,sf_bq126 sf_bq127,PATENTS_GOOGLE,snowflake,"For each publication family whose earliest publication was first published in January 2015, please provide the earliest publication date, the distinct publication numbers, their country codes, the distinct CPC and IPC codes, distinct families (namely, the ids) that cite and are cited by this publication family. Please present all lists as comma-separated values, sorted by the first letter of the code for clarity.","WITH fam AS ( SELECT DISTINCT ""family_id"" @@ -3801,7 +3801,7 @@ FROM LEFT JOIN cit ON fam.""family_id"" = cit.""family_id"" LEFT JOIN gpr ON fam.""family_id"" = gpr.""family_id"" WHERE - pub.""publication_date"" BETWEEN 20150101 AND 20150131;",ABS_AND_EMB.cited_by; PUBLICATIONS.citation; PUBLICATIONS.country_code; PUBLICATIONS.cpc; PUBLICATIONS.family_id; PUBLICATIONS.ipc; PUBLICATIONS.publication_date; PUBLICATIONS.publication_number,8,lite_sql,sf_bq127 + pub.""publication_date"" BETWEEN 20150101 AND 20150131;",ABS_AND_EMB.cited_by; PUBLICATIONS.citation; PUBLICATIONS.country_code; PUBLICATIONS.cpc; PUBLICATIONS.family_id; PUBLICATIONS.ipc; PUBLICATIONS.publication_date; PUBLICATIONS.publication_number,8,87,lite_sql,sf_bq127 sf_bq128,PATENTSVIEW,snowflake,"Tell me the patent title and abstract, as well as the publication date, the backward citation and forward citation count within 5 years for those published in January 2014. The detailed requirements are provided in `forward_backward_citation.md`.","SELECT patent.""title"", patent.""abstract"", @@ -3869,7 +3869,7 @@ JOIN ( ON app.""patent_id"" = filterData.""patent_id"" WHERE TRY_CAST(app.""date"" AS DATE) < '2014-02-01' - AND TRY_CAST(app.""date"" AS DATE) >= '2014-01-01';",APPLICATION.country; APPLICATION.date; APPLICATION.patent_id; CPC_CURRENT.group_id; CPC_CURRENT.patent_id; CPC_CURRENT.subsection_id; PATENT.abstract; PATENT.id; PATENT.title; USPATENTCITATION.citation_id; USPATENTCITATION.date; USPATENTCITATION.patent_id,12,lite_sql,sf_bq128 + AND TRY_CAST(app.""date"" AS DATE) >= '2014-01-01';",APPLICATION.country; APPLICATION.date; APPLICATION.patent_id; CPC_CURRENT.group_id; CPC_CURRENT.patent_id; CPC_CURRENT.subsection_id; PATENT.abstract; PATENT.id; PATENT.title; USPATENTCITATION.citation_id; USPATENTCITATION.date; USPATENTCITATION.patent_id,12,304,lite_sql,sf_bq128 bq130,covid19_nyt,bigquery,"Analyze daily new COVID-19 case counts from March to May 2020, identifying the top five states by daily increases. Please compile a ranking based on how often each state appears in these daily top fives. Then, examine the state that ranks fourth overall and identify its top five counties based on their frequency of appearing in the daily top five new case counts.","WITH StateCases AS ( SELECT b.state_name, @@ -3971,7 +3971,7 @@ TopCounties AS ( SELECT county FROM - TopCounties;",us_counties.confirmed_cases; us_counties.county; us_counties.county_fips_code; us_counties.date; us_counties.state_name; us_states.confirmed_cases; us_states.date; us_states.state_fips_code; us_states.state_name,9,lite_sql,sf_bq130 + TopCounties;",us_counties.confirmed_cases; us_counties.county; us_counties.county_fips_code; us_counties.date; us_counties.state_name; us_states.confirmed_cases; us_states.date; us_states.state_fips_code; us_states.state_name,9,29,lite_sql,sf_bq130 bq143,CPTAC_PDC,bigquery,"Use CPTAC proteomics and RNAseq data for Clear Cell Renal Cell Carcinoma to select 'Primary Tumor' and 'Solid Tissue Normal' samples. Join the datasets on sample submitter IDs and gene symbols. Calculate the correlation between protein abundance (log2 ratio) and gene expression levels (log-transformed+1 FPKM) for each gene and sample type. Filter out correlations with an absolute value greater than 0.5, and compute the average correlation for each sample type.","WITH quant AS ( SELECT @@ -4030,7 +4030,7 @@ pval AS ( ) SELECT sample_type, AVG(corr) FROM pval -GROUP BY sample_type;",RNAseq_hg38_gdc_current.fpkm_unstranded; RNAseq_hg38_gdc_current.gene_name; RNAseq_hg38_gdc_current.sample_barcode; aliquot_to_case_mapping_current.aliquot_id; aliquot_to_case_mapping_current.case_id; aliquot_to_case_mapping_current.sample_submitter_id; aliquot_to_case_mapping_current.sample_type; quant_proteome_CPTAC_CCRCC_discovery_study_pdc_current.aliquot_id; quant_proteome_CPTAC_CCRCC_discovery_study_pdc_current.case_id; quant_proteome_CPTAC_CCRCC_discovery_study_pdc_current.gene_symbol; quant_proteome_CPTAC_CCRCC_discovery_study_pdc_current.protein_abundance_log2ratio,11,lite_sql,sf_bq143 +GROUP BY sample_type;",RNAseq_hg38_gdc_current.fpkm_unstranded; RNAseq_hg38_gdc_current.gene_name; RNAseq_hg38_gdc_current.sample_barcode; aliquot_to_case_mapping_current.aliquot_id; aliquot_to_case_mapping_current.case_id; aliquot_to_case_mapping_current.sample_submitter_id; aliquot_to_case_mapping_current.sample_type; quant_proteome_CPTAC_CCRCC_discovery_study_pdc_current.aliquot_id; quant_proteome_CPTAC_CCRCC_discovery_study_pdc_current.case_id; quant_proteome_CPTAC_CCRCC_discovery_study_pdc_current.gene_symbol; quant_proteome_CPTAC_CCRCC_discovery_study_pdc_current.protein_abundance_log2ratio,11,1424,lite_sql,sf_bq143 bq144,ncaa_insights,bigquery,I would like to merge NCAA basketball historical tournament games outcomes with additional pace and efficiency performance metrics to enable comprehensive analysis of team and opponent dynamics from the 2014 season onwards (2018 included). Please refer to the Query Variable Guide to provide all the data.,"WITH outcomes AS ( SELECT @@ -4096,7 +4096,7 @@ FROM outcomes AS o LEFT JOIN `data-to-insights.ncaa.feature_engineering` AS team ON o.school_ncaa = team.team AND o.season = team.season LEFT JOIN `data-to-insights.ncaa.feature_engineering` AS opp -ON o.opponent_school_ncaa = opp.team AND o.season = opp.season",2018_tournament_results.label; 2018_tournament_results.opponent_school_ncaa; 2018_tournament_results.opponent_seed; 2018_tournament_results.school_ncaa; 2018_tournament_results.season; 2018_tournament_results.seed; feature_engineering.efficiency_rank; feature_engineering.efficiency_rating; feature_engineering.pace_rank; feature_engineering.pace_rating; feature_engineering.poss_40min; feature_engineering.pts_100poss; feature_engineering.season; feature_engineering.team; mbb_historical_tournament_games.lose_school_ncaa; mbb_historical_tournament_games.lose_seed; mbb_historical_tournament_games.season; mbb_historical_tournament_games.win_school_ncaa; mbb_historical_tournament_games.win_seed,19,lite_sql,sf_bq144 +ON o.opponent_school_ncaa = opp.team AND o.season = opp.season",2018_tournament_results.label; 2018_tournament_results.opponent_school_ncaa; 2018_tournament_results.opponent_seed; 2018_tournament_results.school_ncaa; 2018_tournament_results.season; 2018_tournament_results.seed; feature_engineering.efficiency_rank; feature_engineering.efficiency_rating; feature_engineering.pace_rank; feature_engineering.pace_rating; feature_engineering.poss_40min; feature_engineering.pts_100poss; feature_engineering.season; feature_engineering.team; mbb_historical_tournament_games.lose_school_ncaa; mbb_historical_tournament_games.lose_seed; mbb_historical_tournament_games.season; mbb_historical_tournament_games.win_school_ncaa; mbb_historical_tournament_games.win_seed,19,552,lite_sql,sf_bq144 sf_bq150,TCGA_HG19_DATA_V0,snowflake,"Assess whether different genetic variants affect the log10-transformed TP53 expression levels in TCGA-BRCA samples using sequencing and mutation data. Provide the total number of samples, the number of mutation types, the mean square between groups, the mean square within groups, and the F-statistic.","WITH cohortExpr AS ( SELECT @@ -4196,7 +4196,7 @@ SELECT ""mean_sq_between"" / ""mean_sq_within"" AS ""F"" FROM numerator, - denominator;",RNASEQ_GENE_EXPRESSION_UNC_RSEM.HGNC_gene_symbol; RNASEQ_GENE_EXPRESSION_UNC_RSEM.normalized_count; RNASEQ_GENE_EXPRESSION_UNC_RSEM.project_short_name; RNASEQ_GENE_EXPRESSION_UNC_RSEM.sample_barcode; SOMATIC_MUTATION_MC3.SYMBOL; SOMATIC_MUTATION_MC3.Variant_Type; SOMATIC_MUTATION_MC3.sample_barcode_tumor,7,lite_sql,sf_bq150 + denominator;",RNASEQ_GENE_EXPRESSION_UNC_RSEM.HGNC_gene_symbol; RNASEQ_GENE_EXPRESSION_UNC_RSEM.normalized_count; RNASEQ_GENE_EXPRESSION_UNC_RSEM.project_short_name; RNASEQ_GENE_EXPRESSION_UNC_RSEM.sample_barcode; SOMATIC_MUTATION_MC3.SYMBOL; SOMATIC_MUTATION_MC3.Variant_Type; SOMATIC_MUTATION_MC3.sample_barcode_tumor,7,254,lite_sql,sf_bq150 bq151,pancancer_atlas_2,bigquery,"Using TCGA dataset, calculate the chi-squared statistic to evaluate the association between KRAS and TP53 gene mutations in patients diagnosed with pancreatic adenocarcinoma (PAAD). Incorporate clinical follow-up data and high-quality mutation annotations to accurately determine the frequency of patients with co-occurring KRAS and TP53 mutations compared to those with each mutation occurring independently. Ensure that patient records are meticulously matched based on unique identifiers to maintain data integrity. This analysis aims to identify and quantify potential correlations between KRAS and TP53 genetic alterations within the PAAD patient population.","WITH barcodes AS ( SELECT bcr_patient_barcode AS ParticipantBarcode @@ -4270,7 +4270,7 @@ SELECT POWER((c - (row2_total * col1_total) / grand_total), 2) / ((row2_total * col1_total) / grand_total) + POWER((d - (row2_total * col2_total) / grand_total), 2) / ((row2_total * col2_total) / grand_total) AS chi_square_statistic FROM contingency_table -WHERE a IS NOT NULL AND b IS NOT NULL AND c IS NOT NULL AND d IS NOT NULL;",Filtered_MC3_MAF_V5_one_per_tumor_sample.FILTER; Filtered_MC3_MAF_V5_one_per_tumor_sample.Hugo_Symbol; Filtered_MC3_MAF_V5_one_per_tumor_sample.ParticipantBarcode; Filtered_MC3_MAF_V5_one_per_tumor_sample.Study; Filtered_clinical_PANCAN_patient_with_followup.acronym; Filtered_clinical_PANCAN_patient_with_followup.bcr_patient_barcode,6,lite_sql,sf_bq151 +WHERE a IS NOT NULL AND b IS NOT NULL AND c IS NOT NULL AND d IS NOT NULL;",Filtered_MC3_MAF_V5_one_per_tumor_sample.FILTER; Filtered_MC3_MAF_V5_one_per_tumor_sample.Hugo_Symbol; Filtered_MC3_MAF_V5_one_per_tumor_sample.ParticipantBarcode; Filtered_MC3_MAF_V5_one_per_tumor_sample.Study; Filtered_clinical_PANCAN_patient_with_followup.acronym; Filtered_clinical_PANCAN_patient_with_followup.bcr_patient_barcode,6,1623,lite_sql,sf_bq151 sf_bq153,PANCANCER_ATLAS_1,snowflake,Calculate the average log10(normalized_count + 1) expression level of the IGF2 gene for each histology type among LGG patients. Include only patients with valid IGF2 expression data and histology types not enclosed in square brackets. Match gene expression and clinical data using ParticipantBarcode.,"WITH table1 AS ( SELECT @@ -4323,7 +4323,7 @@ SELECT FROM table_data GROUP BY - ""data2"";",CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.acronym; CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.bcr_patient_barcode; CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.icd_o_3_histology; EBPP_ADJUSTPANCAN_ILLUMINAHISEQ_RNASEQV2_GENEXP_FILTERED.ParticipantBarcode; EBPP_ADJUSTPANCAN_ILLUMINAHISEQ_RNASEQV2_GENEXP_FILTERED.Symbol; EBPP_ADJUSTPANCAN_ILLUMINAHISEQ_RNASEQV2_GENEXP_FILTERED.normalized_count,6,snow_sql_near_exact,sf_bq153 + ""data2"";",CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.acronym; CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.bcr_patient_barcode; CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.icd_o_3_histology; EBPP_ADJUSTPANCAN_ILLUMINAHISEQ_RNASEQV2_GENEXP_FILTERED.ParticipantBarcode; EBPP_ADJUSTPANCAN_ILLUMINAHISEQ_RNASEQV2_GENEXP_FILTERED.Symbol; EBPP_ADJUSTPANCAN_ILLUMINAHISEQ_RNASEQV2_GENEXP_FILTERED.normalized_count,6,825,snow_sql_near_exact,sf_bq153 sf_bq155,TCGA_HG38_DATA_V0,snowflake,"Help me calculate the t-statistic based on the Pearson correlation coefficient between all possible pairs of gene `SNORA31` in the RNAseq data (Log10 transformation) and unique identifiers in the microRNA data available in TCGA. The cohort for this analysis consists of BRCA patients that are 80 years old or younger at the time of diagnosis and Stage I,II,IIA as pathological state. And only consider samples of size more than 25 and with absolute Pearson correlation at least 0.3, and less than 1.0.","WITH cohort AS ( SELECT ""case_barcode"" FROM ""TCGA_HG38_DATA_V0"".""TCGA_BIOCLIN_V0"".""CLINICAL"" @@ -4392,7 +4392,7 @@ FROM WHERE ""n"" > 25 AND ABS(""correlation"") >= 0.3 - AND ABS(""correlation"") < 1.0;",CLINICAL.age_at_diagnosis; CLINICAL.case_barcode; CLINICAL.pathologic_stage; CLINICAL.project_short_name; MIRNASEQ_EXPRESSION.case_barcode; MIRNASEQ_EXPRESSION.mirna_id; MIRNASEQ_EXPRESSION.reads_per_million_miRNA_mapped; RNASEQ_GENE_EXPRESSION.HTSeq__Counts; RNASEQ_GENE_EXPRESSION.case_barcode; RNASEQ_GENE_EXPRESSION.gene_name,10,snow_sql_near_exact,sf_bq155 + AND ABS(""correlation"") < 1.0;",CLINICAL.age_at_diagnosis; CLINICAL.case_barcode; CLINICAL.pathologic_stage; CLINICAL.project_short_name; MIRNASEQ_EXPRESSION.case_barcode; MIRNASEQ_EXPRESSION.mirna_id; MIRNASEQ_EXPRESSION.reads_per_million_miRNA_mapped; RNASEQ_GENE_EXPRESSION.HTSeq__Counts; RNASEQ_GENE_EXPRESSION.case_barcode; RNASEQ_GENE_EXPRESSION.gene_name,10,708,snow_sql_near_exact,sf_bq155 sf_bq158,PANCANCER_ATLAS_1,snowflake,Which top five histological types of breast cancer (BRCA) in the PanCancer Atlas exhibit the highest percentage of CDH1 gene mutations?,"WITH table1 AS ( SELECT @@ -4450,7 +4450,7 @@ FROM percentages ORDER BY ""mutation_percentage"" DESC -LIMIT 5;",CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.acronym; CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.bcr_patient_barcode; CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.histological_type; MC3_MAF_V5_ONE_PER_TUMOR_SAMPLE.Hugo_Symbol; MC3_MAF_V5_ONE_PER_TUMOR_SAMPLE.ParticipantBarcode; MC3_MAF_V5_ONE_PER_TUMOR_SAMPLE.Study,6,snow_sql_near_exact,sf_bq158 +LIMIT 5;",CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.acronym; CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.bcr_patient_barcode; CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.histological_type; MC3_MAF_V5_ONE_PER_TUMOR_SAMPLE.Hugo_Symbol; MC3_MAF_V5_ONE_PER_TUMOR_SAMPLE.ParticipantBarcode; MC3_MAF_V5_ONE_PER_TUMOR_SAMPLE.Study,6,825,snow_sql_near_exact,sf_bq158 sf_bq159,PANCANCER_ATLAS_1,snowflake,Calculate the chi-square value to assess the association between histological types and the presence of CDH1 gene mutations in BRCA patients using data from the PanCancer Atlas. Focus on patients with known histological types and consider only reliable mutation entries. Exclude any histological types or mutation statuses with marginal totals less than or equal to 10. Match clinical and mutation data using ParticipantBarcode,"WITH table1 AS ( SELECT @@ -4548,7 +4548,7 @@ sf_bq159,PANCANCER_ATLAS_1,snowflake,Calculate the chi-square value to assess th SELECT SUM( ( ""Nij"" - ""E_nij"" ) * ( ""Nij"" - ""E_nij"" ) / ""E_nij"" ) AS ""Chi2"" FROM - contingency_table;",CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.acronym; CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.bcr_patient_barcode; CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.histological_type; MC3_MAF_V5_ONE_PER_TUMOR_SAMPLE.FILTER; MC3_MAF_V5_ONE_PER_TUMOR_SAMPLE.Hugo_Symbol; MC3_MAF_V5_ONE_PER_TUMOR_SAMPLE.ParticipantBarcode,6,snow_sql_near_exact,sf_bq159 + contingency_table;",CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.acronym; CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.bcr_patient_barcode; CLINICAL_PANCAN_PATIENT_WITH_FOLLOWUP_FILTERED.histological_type; MC3_MAF_V5_ONE_PER_TUMOR_SAMPLE.FILTER; MC3_MAF_V5_ONE_PER_TUMOR_SAMPLE.Hugo_Symbol; MC3_MAF_V5_ONE_PER_TUMOR_SAMPLE.ParticipantBarcode,6,825,snow_sql_near_exact,sf_bq159 bq161,pancancer_atlas_2,bigquery,"Calculate the net difference between the number of pancreatic adenocarcinoma (PAAD) patients in TCGA's dataset who are confirmed to have mutations in both KRAS and TP53 genes, and those without mutations in either gene. Utilize patient clinical and follow-up data alongside genomic mutation details from TCGA’s cancer genomics database, focusing specifically on PAAD studies where the mutations have passed quality filters.","WITH barcodes AS ( SELECT bcr_patient_barcode AS ParticipantBarcode @@ -4608,7 +4608,7 @@ GROUP BY SELECT (SELECT Nij FROM INFO WHERE data1=""YES"" AND data2=""YES"") - -(SELECT Nij FROM INFO WHERE data1=""NO"" AND data2=""NO"")",Filtered_MC3_MAF_V5_one_per_tumor_sample.FILTER; Filtered_MC3_MAF_V5_one_per_tumor_sample.Hugo_Symbol; Filtered_MC3_MAF_V5_one_per_tumor_sample.ParticipantBarcode; Filtered_MC3_MAF_V5_one_per_tumor_sample.Study; Filtered_clinical_PANCAN_patient_with_followup.acronym; Filtered_clinical_PANCAN_patient_with_followup.bcr_patient_barcode,6,lite_sql,sf_bq161 +(SELECT Nij FROM INFO WHERE data1=""NO"" AND data2=""NO"")",Filtered_MC3_MAF_V5_one_per_tumor_sample.FILTER; Filtered_MC3_MAF_V5_one_per_tumor_sample.Hugo_Symbol; Filtered_MC3_MAF_V5_one_per_tumor_sample.ParticipantBarcode; Filtered_MC3_MAF_V5_one_per_tumor_sample.Study; Filtered_clinical_PANCAN_patient_with_followup.acronym; Filtered_clinical_PANCAN_patient_with_followup.bcr_patient_barcode,6,1623,lite_sql,sf_bq161 sf_bq166,TCGA_MITELMAN,snowflake,"Analyze the largest copy number of chromosomal aberrations including amplifications, gains, homozygous deletions, heterozygous deletions, and normal copy states across cytogenetic bands in TCGA-KIRC kidney cancer samples. Use segment allelic data to identify the maximum copy number aberrations within each chromosomal segment, and report their frequencies, sorted by chromosome and cytoband.","WITH copy AS ( SELECT ""case_barcode"", @@ -4706,7 +4706,7 @@ FROM total_cases ORDER BY aberrations.""chromosome"", - aberrations.""cytoband_name"";",COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.case_barcode; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.chromosome; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.copy_number; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.end_pos; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.project_short_name; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.sample_barcode; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.start_pos; CYTOBANDS_HG38.chromosome; CYTOBANDS_HG38.cytoband_name; CYTOBANDS_HG38.hg38_start; CYTOBANDS_HG38.hg38_stop,11,snow_sql_near_exact,sf_bq166 + aberrations.""cytoband_name"";",COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.case_barcode; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.chromosome; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.copy_number; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.end_pos; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.project_short_name; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.sample_barcode; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.start_pos; CYTOBANDS_HG38.chromosome; CYTOBANDS_HG38.cytoband_name; CYTOBANDS_HG38.hg38_start; CYTOBANDS_HG38.hg38_stop,11,1442,snow_sql_near_exact,sf_bq166 sf_bq167,META_KAGGLE,snowflake,Please find the giver-and-recipient pair with the most Kaggle forum upvotes. Display their usernames and the respective number of upvotes they gave to each other.,"WITH UserPairUpvotes AS ( SELECT ToUsers.""UserName"" AS ""ToUserName"", @@ -4746,7 +4746,7 @@ SELECT ""UpvotesReceived"" AS ""UpvotesReceivedByUpvotedUser"", ""UpvotesGiven"" AS ""UpvotesGivenByUpvotedUser"" FROM ReciprocalUpvotes -ORDER BY ""UpvotesReceived"" DESC, ""UpvotesGiven"" DESC;",FORUMMESSAGEVOTES.FromUserId; FORUMMESSAGEVOTES.Id; FORUMMESSAGEVOTES.ToUserId; USERS.Id; USERS.UserName,5,lite_sql,sf_bq167 +ORDER BY ""UpvotesReceived"" DESC, ""UpvotesGiven"" DESC;",FORUMMESSAGEVOTES.FromUserId; FORUMMESSAGEVOTES.Id; FORUMMESSAGEVOTES.ToUserId; USERS.Id; USERS.UserName,5,237,lite_sql,sf_bq167 bq172,cms_data,bigquery,"For the drug with the highest total number of prescriptions in New York State during 2014, could you list the top five states with the highest total claim counts for this drug? Please also include their total claim counts and total drug costs. ","WITH ny_top_drug AS ( SELECT drug_name AS drug_name, @@ -4781,7 +4781,7 @@ SELECT total_claim_count, total_drug_cost FROM - top_5_states;",part_d_prescriber_2014.drug_name; part_d_prescriber_2014.nppes_provider_state; part_d_prescriber_2014.total_claim_count; part_d_prescriber_2014.total_drug_cost,4,lite_sql,sf_bq172 + top_5_states;",part_d_prescriber_2014.drug_name; part_d_prescriber_2014.nppes_provider_state; part_d_prescriber_2014.total_claim_count; part_d_prescriber_2014.total_drug_cost,4,649,lite_sql,sf_bq172 sf_bq176,TCGA_MITELMAN,snowflake,"Identify the case barcodes from the TCGA-LAML study with the highest weighted average copy number in cytoband 15q11 on chromosome 15, using segment data and cytoband overlaps from TCGA's genomic and Mitelman databases.","WITH copy AS ( SELECT ""case_barcode"", @@ -4855,7 +4855,7 @@ WHERE AND ""cytoband_name"" = '15q11' ORDER BY ""copy_number"" DESC -LIMIT 1;",COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.case_barcode; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.chromosome; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.copy_number; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.end_pos; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.project_short_name; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.start_pos; CYTOBANDS_HG38.chromosome; CYTOBANDS_HG38.cytoband_name; CYTOBANDS_HG38.hg38_start; CYTOBANDS_HG38.hg38_stop,10,snow_sql_near_exact,sf_bq176 +LIMIT 1;",COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.case_barcode; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.chromosome; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.copy_number; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.end_pos; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.project_short_name; COPY_NUMBER_SEGMENT_ALLELIC_HG38_GDC_R23.start_pos; CYTOBANDS_HG38.chromosome; CYTOBANDS_HG38.cytoband_name; CYTOBANDS_HG38.hg38_start; CYTOBANDS_HG38.hg38_stop,10,1442,snow_sql_near_exact,sf_bq176 sf_bq182,GITHUB_REPOS_DATE,snowflake,"Which primary programming languages, determined by the highest number of bytes in each repository, have the sum of over 5 pull requests on January 18, 2023 in all its repositories?","WITH event_data AS ( SELECT @@ -4921,7 +4921,7 @@ SELECT ""count"" FROM count_data WHERE ""count"" >= 5 - AND ""type"" = 'PullRequestEvent';",LANGUAGES.language; LANGUAGES.repo_name; _20_*.created_at; _20_*.repo; _20_*.type,5,lite_sql,sf_bq182 + AND ""type"" = 'PullRequestEvent';",LANGUAGES.language; LANGUAGES.repo_name; _20_*.created_at; _20_*.repo; _20_*.type,5,43,lite_sql,sf_bq182 bq185,new_york_plus,bigquery,"What is the average valid trip duration (in minutes) for yellow taxi rides in Brooklyn with more than 3 passengers and a trip distance of at least 10 miles between February 1 and February 7, 2016?","SELECT AVG(TIMESTAMP_DIFF(dropoff_datetime, pickup_datetime, SECOND) / 60.0) AS average_trip_duration_in_minutes FROM @@ -4941,7 +4941,7 @@ INNER JOIN `bigquery-public-data.new_york_taxi_trips.taxi_zone_geom` tz1 ON t.dropoff_location_id = tz1.zone_id WHERE tz.borough = ""Brooklyn"" AND - tz1.borough = ""Brooklyn"";",taxi_zone_geom.borough; taxi_zone_geom.zone_id; tlc_yellow_trips_*.dropoff_datetime; tlc_yellow_trips_*.dropoff_location_id; tlc_yellow_trips_*.passenger_count; tlc_yellow_trips_*.pickup_datetime; tlc_yellow_trips_*.pickup_location_id; tlc_yellow_trips_*.trip_distance,8,lite_sql,sf_bq185 + tz1.borough = ""Brooklyn"";",taxi_zone_geom.borough; taxi_zone_geom.zone_id; tlc_yellow_trips_*.dropoff_datetime; tlc_yellow_trips_*.dropoff_location_id; tlc_yellow_trips_*.passenger_count; tlc_yellow_trips_*.pickup_datetime; tlc_yellow_trips_*.pickup_location_id; tlc_yellow_trips_*.trip_distance,8,360,lite_sql,sf_bq185 sf_bq187,ETHEREUM_BLOCKCHAIN,snowflake,"What is the total circulating supply balances of the 'BNB' token for all addresses (excluding the zero address), based on the amount they have received (converted by dividing by 10^18) minus the amount they have sent?","WITH tokenInfo AS ( SELECT ""address"" FROM ""ETHEREUM_BLOCKCHAIN"".""ETHEREUM_BLOCKCHAIN"".""TOKENS"" @@ -4983,7 +4983,7 @@ walletBalances AS ( SELECT SUM(""balance"") AS ""circulating_supply"" -FROM walletBalances;",TOKEN_TRANSFERS.from_address; TOKEN_TRANSFERS.to_address; TOKEN_TRANSFERS.token_address; TOKEN_TRANSFERS.value,4,snow_sql_near_exact,sf_bq187 +FROM walletBalances;",TOKEN_TRANSFERS.from_address; TOKEN_TRANSFERS.to_address; TOKEN_TRANSFERS.token_address; TOKEN_TRANSFERS.value,4,88,snow_sql_near_exact,sf_bq187 sf_bq193,GITHUB_REPOS,snowflake,"Retrieve all non-empty, non-commented lines of text from readme.md files in GitHub repositories. Exclude lines that are comments (lines starting with # for Markdown comments and // for code comments), and for each line, provide the frequency of occurrence along with a comma-separated list of programming languages (sorted alphabetically) used in the repository that contains the line.","WITH content_extracted AS ( SELECT ""D"".""id"" AS ""id"", @@ -5069,7 +5069,7 @@ SELECT FROM aggregated_languages ORDER BY - ""frequency"" DESC;",LANGUAGES.language; LANGUAGES.repo_name; SAMPLE_CONTENTS.binary; SAMPLE_CONTENTS.content; SAMPLE_CONTENTS.sample_path; SAMPLE_CONTENTS.sample_repo_name,6,snow_sql_near_exact,sf_bq193 + ""frequency"" DESC;",LANGUAGES.language; LANGUAGES.repo_name; SAMPLE_CONTENTS.binary; SAMPLE_CONTENTS.content; SAMPLE_CONTENTS.sample_path; SAMPLE_CONTENTS.sample_repo_name,6,34,snow_sql_near_exact,sf_bq193 bq198,ncaa_basketball,bigquery,"What are the top 5 most successful college basketball teams over the seasons from 1900 to 2000, based on the number of times they had the maximum wins in a season?","SELECT team_name, COUNT(*) AS top_performer_count @@ -5101,7 +5101,7 @@ ORDER BY top_performer_count DESC, team_name LIMIT - 5",mbb_historical_teams_seasons.market; mbb_historical_teams_seasons.season; mbb_historical_teams_seasons.wins,3,lite_sql,sf_bq198 + 5",mbb_historical_teams_seasons.market; mbb_historical_teams_seasons.season; mbb_historical_teams_seasons.wins,3,505,lite_sql,sf_bq198 bq199,iowa_liquor_sales,bigquery,"Identify the top 10 liquor categories in Iowa by average price per liter in 2021, and provide their average prices per liter for 2019, 2020, and 2021.","WITH price_2020 AS ( SELECT category_name AS category, @@ -5152,7 +5152,7 @@ LEFT JOIN ORDER BY price_2021.avg_price_liter_2021 DESC LIMIT - 10;",sales.bottle_volume_ml; sales.category_name; sales.date; sales.state_bottle_retail,4,lite_sql,sf_bq199 + 10;",sales.bottle_volume_ml; sales.category_name; sales.date; sales.state_bottle_retail,4,24,lite_sql,sf_bq199 bq203,new_york_plus,bigquery,What percentage of subway stations in each New York borough have at least one ADA-compliant entrance?,"WITH stations_n_entrances AS ( SELECT borough_name,s.station_name,entry,ada_compliant FROM `bigquery-public-data.new_york_subway.stations` s @@ -5168,7 +5168,7 @@ LEFT JOIN `stations_n_entrances` adas ON se.station_name = adas.station_name AND adas.entry AND adas.ada_compliant GROUP BY 1 -ORDER BY 4 DESC",station_entrances.ada_compliant; station_entrances.entry; station_entrances.station_name; stations.borough_name; stations.station_name,5,lite_sql,sf_bq203 +ORDER BY 4 DESC",station_entrances.ada_compliant; station_entrances.entry; station_entrances.station_name; stations.borough_name; stations.station_name,5,360,lite_sql,sf_bq203 bq204,eclipse_megamovie,bigquery,Find the user with the highest total clicks across all records from all available photo collections.,"SELECT user FROM ( Select user @@ -5197,7 +5197,7 @@ Select user ) GROUP BY user)) ORDER BY COUNT(user) -LIMIT 1",photos_v_*.user; photos_v_0_3.user,2,lite_sql,sf_bq204 +LIMIT 1",photos_v_*.user; photos_v_0_3.user,2,81,lite_sql,sf_bq204 sf_bq209,PATENTS,snowflake,Can you find how many utility patents granted in 2010 have exactly one forward citation within the ten years following their application date?,"WITH patents_sample AS ( SELECT t1.""publication_number"", @@ -5264,7 +5264,7 @@ SELECT FROM forward_citation WHERE - ""forward_citations"" = 1;",PUBLICATIONS.application_number; PUBLICATIONS.citation; PUBLICATIONS.filing_date; PUBLICATIONS.grant_date; PUBLICATIONS.publication_number,5,lite_sql,sf_bq209 + ""forward_citations"" = 1;",PUBLICATIONS.application_number; PUBLICATIONS.citation; PUBLICATIONS.filing_date; PUBLICATIONS.grant_date; PUBLICATIONS.publication_number,5,79,lite_sql,sf_bq209 sf_bq210,PATENTS,snowflake,How many US B2 patents granted between 2008 and 2018 contain claims that do not include the word 'claim'?,"WITH patents_sample AS ( SELECT t1.""publication_number"" AS publication_number, @@ -5290,7 +5290,7 @@ Publication_data AS ( SELECT COUNT(nb_indep_claims) FROM Publication_data -WHERE nb_indep_claims != 0",PUBLICATIONS.claims_localized; PUBLICATIONS.country_code; PUBLICATIONS.grant_date; PUBLICATIONS.publication_number,4,lite_sql,sf_bq210 +WHERE nb_indep_claims != 0",PUBLICATIONS.claims_localized; PUBLICATIONS.country_code; PUBLICATIONS.grant_date; PUBLICATIONS.publication_number,4,79,lite_sql,sf_bq210 sf_bq213,PATENTS,snowflake,What is the most common 4-digit IPC code among US B2 utility patents granted from June to August in 2022?,"WITH interim_table as( SELECT t1.""publication_number"", @@ -5313,7 +5313,7 @@ FROM interim_table GROUP BY ipc4 ORDER BY COUNT(""publication_number"") DESC -LIMIT 1",PUBLICATIONS.country_code; PUBLICATIONS.grant_date; PUBLICATIONS.ipc; PUBLICATIONS.kind_code; PUBLICATIONS.publication_number,5,snow_sql_near_exact,sf_bq213 +LIMIT 1",PUBLICATIONS.country_code; PUBLICATIONS.grant_date; PUBLICATIONS.ipc; PUBLICATIONS.kind_code; PUBLICATIONS.publication_number,5,79,snow_sql_near_exact,sf_bq213 sf_bq216,PATENTS_GOOGLE,snowflake,Identify the top five patents filed in the same year as `US-9741766-B2` that are most similar to it based on technological similarities. Please provide the publication numbers.,"WITH patents_sample AS ( SELECT ""publication_number"", @@ -5385,7 +5385,7 @@ FROM ( similarities s ) s WHERE - seqnum <= 5;",ABS_AND_EMB.embedding_v1; ABS_AND_EMB.publication_number; PUBLICATIONS.filing_date; PUBLICATIONS.publication_number,4,snow_sql_near_exact,sf_bq216 + seqnum <= 5;",ABS_AND_EMB.embedding_v1; ABS_AND_EMB.publication_number; PUBLICATIONS.filing_date; PUBLICATIONS.publication_number,4,87,snow_sql_near_exact,sf_bq216 bq218,iowa_liquor_sales,bigquery,What are the top 5 items with the highest year-over-year growth percentage in total sales revenue for the year 2023?,"WITH AnnualSales AS ( SELECT item_description, @@ -5434,7 +5434,7 @@ SELECT item_description FROM total_info order by yoy_growth_percentage DESC -LIMIT 5",sales.date; sales.invoice_and_item_number; sales.item_description; sales.sale_dollars,4,lite_sql,sf_bq218 +LIMIT 5",sales.date; sales.invoice_and_item_number; sales.item_description; sales.sale_dollars,4,24,lite_sql,sf_bq218 sf_bq219,IOWA_LIQUOR_SALES,snowflake,"Which two liquor categories, each contributing an average of at least 1% to monthly sales volume over 24 months, have the lowest Pearson correlation coefficient in their sales percentages?","WITH MonthlyTotals AS ( @@ -5503,7 +5503,7 @@ FROM middle_info ORDER BY ""category_corr_across_months"" -LIMIT 1;",SALES.category; SALES.category_name; SALES.date; SALES.volume_sold_gallons,4,lite_sql,sf_bq219 +LIMIT 1;",SALES.category; SALES.category_name; SALES.date; SALES.volume_sold_gallons,4,24,lite_sql,sf_bq219 sf_bq221,PATENTS,snowflake,"Identify the CPC technology areas with the highest exponential moving average of patent filings each year (smoothing factor 0.2), and provide the full title and the best year for each CPC group at level 5.","WITH patent_cpcs AS ( SELECT cd.""parents"", @@ -5603,7 +5603,7 @@ WHERE AND r.rn_rank = 1 ORDER BY c.""titleFull"", - ""cpc_group"" ASC;",CPC_DEFINITION.level; CPC_DEFINITION.parents; CPC_DEFINITION.symbol; CPC_DEFINITION.titleFull; PUBLICATIONS.application_number; PUBLICATIONS.cpc; PUBLICATIONS.filing_date,7,snow_sql_near_exact,sf_bq221 + ""cpc_group"" ASC;",CPC_DEFINITION.level; CPC_DEFINITION.parents; CPC_DEFINITION.symbol; CPC_DEFINITION.titleFull; PUBLICATIONS.application_number; PUBLICATIONS.cpc; PUBLICATIONS.filing_date,7,79,snow_sql_near_exact,sf_bq221 sf_bq222,PATENTS,snowflake,"Find the CPC technology areas in Germany with the highest exponential moving average of patent filings each year (smoothing factor 0.1) for patents granted in December 2016. Show me the full title, CPC group and the best year for each CPC group at level 4.","WITH patent_cpcs AS ( SELECT cd.""parents"", @@ -5651,7 +5651,7 @@ FROM moving_avg JOIN ""PATENTS"".""PATENTS"".""CPC_DEFINITION"" c ON ""cpc_group"" = c.""symbol"" WHERE c.""level"" = 4 GROUP BY c.""titleFull"", ""cpc_group"" -ORDER BY c.""titleFull"", ""cpc_group"" ASC;",CPC_DEFINITION.level; CPC_DEFINITION.parents; CPC_DEFINITION.symbol; CPC_DEFINITION.titleFull; PUBLICATIONS.application_number; PUBLICATIONS.country_code; PUBLICATIONS.cpc; PUBLICATIONS.filing_date; PUBLICATIONS.grant_date,9,lite_sql,sf_bq222 +ORDER BY c.""titleFull"", ""cpc_group"" ASC;",CPC_DEFINITION.level; CPC_DEFINITION.parents; CPC_DEFINITION.symbol; CPC_DEFINITION.titleFull; PUBLICATIONS.application_number; PUBLICATIONS.country_code; PUBLICATIONS.cpc; PUBLICATIONS.filing_date; PUBLICATIONS.grant_date,9,79,lite_sql,sf_bq222 sf_bq223,PATENTS,snowflake,"Which assignees, excluding DENSO CORP itself, have cited patents assigned to DENSO CORP, and what are the titles of the primary CPC subclasses associated with these citations? Provide the name of each citing assignee, the full title of the CPC subclass, and the count of citations grouped by the assignee and the CPC subclass title. Please focus specifically on the main categories of the CPC codes,","SELECT REPLACE(citing_assignee, '""', '') AS citing_assignee, cpcdef.""titleFull"" AS cpc_title, @@ -5686,7 +5686,7 @@ WHERE refs.cited_assignee = 'DENSO CORP' AND pubs.citing_assignee != 'DENSO CORP' GROUP BY - citing_assignee, cpcdef.""titleFull""",CPC_DEFINITION.symbol; CPC_DEFINITION.titleFull; PUBLICATIONS.assignee_harmonized; PUBLICATIONS.citation; PUBLICATIONS.cpc; PUBLICATIONS.publication_number,6,lite_sql,sf_bq223 + citing_assignee, cpcdef.""titleFull""",CPC_DEFINITION.symbol; CPC_DEFINITION.titleFull; PUBLICATIONS.assignee_harmonized; PUBLICATIONS.citation; PUBLICATIONS.cpc; PUBLICATIONS.publication_number,6,79,lite_sql,sf_bq223 sf_bq224,GITHUB_REPOS_DATE,snowflake,"Which repository with an approved license in `licenses.md` had the highest combined total of forks, issues, and watches in April 2022?","WITH allowed_repos AS ( SELECT ""repo_name"", @@ -5744,7 +5744,7 @@ INNER JOIN watch_counts AS wc ON ar.""repo_name"" = wc.""repo"" ORDER BY (fc.""forks"" + ic.""issue_events"" + wc.""watches"") DESC -LIMIT 1;",LICENSES.license; LICENSES.repo_name; _20_*.actor; _20_*.repo; _20_*.type,5,lite_sql,sf_bq224 +LIMIT 1;",LICENSES.license; LICENSES.repo_name; _20_*.actor; _20_*.repo; _20_*.type,5,43,lite_sql,sf_bq224 bq227,london,bigquery,"Could you provide the annual percentage shares, rounded to two decimal places, of the top 5 minor crime categories from 2008 in London's total crimes, with each year displayed in one row?","WITH top5_categories AS ( SELECT minor_category FROM `bigquery-public-data.london_crime.crime_by_lsoa` @@ -5786,7 +5786,7 @@ JOIN GROUP BY t.year, y.total_crimes_year ORDER BY - t.year;",crime_by_lsoa.minor_category; crime_by_lsoa.value; crime_by_lsoa.year,3,lite_sql,sf_bq227 + t.year;",crime_by_lsoa.minor_category; crime_by_lsoa.value; crime_by_lsoa.year,3,39,lite_sql,sf_bq227 bq228,london,bigquery,"Please provide a list of the top three major crime categories in the borough of Barking and Dagenham, along with the number of incidents in each category.","WITH ranked_crimes AS ( SELECT borough, @@ -5813,7 +5813,7 @@ AND borough = 'Barking and Dagenham' ORDER BY borough, - rank_per_borough;",crime_by_lsoa.borough; crime_by_lsoa.major_category; crime_by_lsoa.value,3,lite_sql,sf_bq228 + rank_per_borough;",crime_by_lsoa.borough; crime_by_lsoa.major_category; crime_by_lsoa.value,3,39,lite_sql,sf_bq228 bq232,london,bigquery,Could you provide the total number of 'Other Theft' incidents within the 'Theft and Handling' category for each year in the Westminster borough?,"WITH borough_data AS ( SELECT year, @@ -5851,7 +5851,7 @@ AND AND minor_division != 'Other' GROUP BY year, major_division, minor_division -ORDER BY year;",crime_by_lsoa.borough; crime_by_lsoa.major_category; crime_by_lsoa.minor_category; crime_by_lsoa.month; crime_by_lsoa.value; crime_by_lsoa.year,6,lite_sql,sf_bq232 +ORDER BY year;",crime_by_lsoa.borough; crime_by_lsoa.major_category; crime_by_lsoa.minor_category; crime_by_lsoa.month; crime_by_lsoa.value; crime_by_lsoa.year,6,39,lite_sql,sf_bq232 sf_bq233,GITHUB_REPOS,snowflake,Can you find the imported Python modules and R libraries from the GitHub sample files and list them along with their occurrence counts? Please sort the results by language and then by the number of occurrences in descending order.,"WITH extracted_modules AS ( SELECT el.""file_id"" AS ""file_id"", @@ -5950,7 +5950,7 @@ FROM rlanguage ORDER BY ""language"", - ""occurrence_count"" DESC;",SAMPLE_CONTENTS.binary; SAMPLE_CONTENTS.content; SAMPLE_CONTENTS.id; SAMPLE_CONTENTS.sample_path; SAMPLE_FILES.id; SAMPLE_FILES.path,6,snow_sql_near_exact,sf_bq233 + ""occurrence_count"" DESC;",SAMPLE_CONTENTS.binary; SAMPLE_CONTENTS.content; SAMPLE_CONTENTS.id; SAMPLE_CONTENTS.sample_path; SAMPLE_FILES.id; SAMPLE_FILES.path,6,34,snow_sql_near_exact,sf_bq233 bq234,cms_data,bigquery,What is the most prescribed medication in each state in 2014?,"SELECT A.state, drug_name, @@ -5984,7 +5984,7 @@ INNER JOIN ( state) B ON A.state = B.state - AND A.total_claim_count = B.max_total_claim_count;",part_d_prescriber_2014.generic_name; part_d_prescriber_2014.nppes_provider_state; part_d_prescriber_2014.total_claim_count; part_d_prescriber_2014.total_day_supply; part_d_prescriber_2014.total_drug_cost,5,lite_sql,sf_bq234 + AND A.total_claim_count = B.max_total_claim_count;",part_d_prescriber_2014.generic_name; part_d_prescriber_2014.nppes_provider_state; part_d_prescriber_2014.total_claim_count; part_d_prescriber_2014.total_day_supply; part_d_prescriber_2014.total_drug_cost,5,649,lite_sql,sf_bq234 bq235,cms_data,bigquery,Can you tell me which healthcare provider incurs the highest combined average costs for both outpatient and inpatient services in 2014?,"SELECT Provider_Name FROM @@ -6034,7 +6034,7 @@ ORDER BY combined_average_cost DESC LIMIT 1 -);",inpatient_charges_*.average_medicare_payments; inpatient_charges_*.provider_city; inpatient_charges_*.provider_id; inpatient_charges_*.provider_name; inpatient_charges_*.provider_state; inpatient_charges_*.total_discharges; outpatient_charges_*.average_total_payments; outpatient_charges_*.outpatient_services; outpatient_charges_*.provider_city; outpatient_charges_*.provider_id; outpatient_charges_*.provider_name; outpatient_charges_*.provider_state,12,lite_sql,sf_bq235 +);",inpatient_charges_*.average_medicare_payments; inpatient_charges_*.provider_city; inpatient_charges_*.provider_id; inpatient_charges_*.provider_name; inpatient_charges_*.provider_state; inpatient_charges_*.total_discharges; outpatient_charges_*.average_total_payments; outpatient_charges_*.outpatient_services; outpatient_charges_*.provider_city; outpatient_charges_*.provider_id; outpatient_charges_*.provider_name; outpatient_charges_*.provider_state,12,649,lite_sql,sf_bq235 sf_bq236,NOAA_DATA_PLUS,snowflake,What are the top 5 zip codes of the areas in the United States that have experienced the most hail storm events in the past 10 years?,"SELECT CONCAT(""city"", ', ', ""state_name"") AS ""city"", ""zip_code"", @@ -6083,7 +6083,7 @@ GROUP BY ""state_name"" ORDER BY ""count_storms"" DESC -LIMIT 5;",STORMS_*.event_begin_time; STORMS_*.event_latitude; STORMS_*.event_longitude; STORMS_*.event_type; ZIP_CODES.zip_code; ZIP_CODES.zip_code_geom,6,snow_sql_near_exact,sf_bq236 +LIMIT 5;",STORMS_*.event_begin_time; STORMS_*.event_latitude; STORMS_*.event_longitude; STORMS_*.event_type; ZIP_CODES.zip_code; ZIP_CODES.zip_code_geom,6,886,snow_sql_near_exact,sf_bq236 sf_bq246,PATENTSVIEW,snowflake,Can you figure out the number of forward citations within 1 years from the application date for the patent that has the most backward citations within 1 years from application among all U.S. patents?,"SELECT filterData.""fwrdCitations_3"" FROM PATENTSVIEW.PATENTSVIEW.APPLICATION AS app @@ -6140,7 +6140,7 @@ JOIN ( ) AS filterData ON app.""patent_id"" = filterData.""patent_id"" ORDER BY filterData.""bkwdCitations_3"" DESC -LIMIT 1;",APPLICATION.country; APPLICATION.date; APPLICATION.patent_id; CPC_CURRENT.patent_id; USPATENTCITATION.date; USPATENTCITATION.patent_id,6,lite_sql,sf_bq246 +LIMIT 1;",APPLICATION.country; APPLICATION.date; APPLICATION.patent_id; CPC_CURRENT.patent_id; USPATENTCITATION.date; USPATENTCITATION.patent_id,6,304,lite_sql,sf_bq246 sf_bq248,GITHUB_REPOS,snowflake,"What is the proportion of files whose paths include 'readme.md' that contain the phrase 'Copyright (c)', among all repositories that do not use any programming language with 'python' in its name","WITH requests AS ( SELECT D.""id"", @@ -6198,7 +6198,7 @@ sf_bq248,GITHUB_REPOS,snowflake,"What is the proportion of files whose paths inc SELECT (SELECT COUNT(*) FROM requests WHERE ""content"" LIKE '%Copyright (c)%') / COUNT(*) AS ""proportion"" FROM - requests;",LANGUAGES.language; LANGUAGES.repo_name; SAMPLE_CONTENTS.content; SAMPLE_CONTENTS.id; SAMPLE_FILES.id; SAMPLE_FILES.path; SAMPLE_FILES.repo_name,7,lite_sql,sf_bq248 + requests;",LANGUAGES.language; LANGUAGES.repo_name; SAMPLE_CONTENTS.content; SAMPLE_CONTENTS.id; SAMPLE_FILES.id; SAMPLE_FILES.path; SAMPLE_FILES.repo_name,7,34,lite_sql,sf_bq248 sf_bq250,GEO_OPENSTREETMAP_WORLDPOP,snowflake,"What is the total population living on the geography grid which is the farthest from any hospital in Singapore, based on the most recent population data before 2023? Note that geographic grids and distances are calculated based on geospatial data and GIS related functions. Note to use planet layer in openstreetmap.","WITH country_name AS ( SELECT 'Singapore' AS value ), @@ -6261,7 +6261,7 @@ FROM CROSS JOIN population p GROUP BY distance ORDER BY distance DESC -LIMIT 1;",PLANET_LAYERS.geometry; PLANET_LAYERS.layer_code; POPULATION_GRID_1KM.country_name; POPULATION_GRID_1KM.geo_id; POPULATION_GRID_1KM.geog; POPULATION_GRID_1KM.last_updated; POPULATION_GRID_1KM.latitude_centroid; POPULATION_GRID_1KM.longitude_centroid; POPULATION_GRID_1KM.population,9,lite_sql,sf_bq250 +LIMIT 1;",PLANET_LAYERS.geometry; PLANET_LAYERS.layer_code; POPULATION_GRID_1KM.country_name; POPULATION_GRID_1KM.geo_id; POPULATION_GRID_1KM.geog; POPULATION_GRID_1KM.last_updated; POPULATION_GRID_1KM.latitude_centroid; POPULATION_GRID_1KM.longitude_centroid; POPULATION_GRID_1KM.population,9,94,lite_sql,sf_bq250 sf_bq252,GITHUB_REPOS,snowflake,"Could you please find the name of the repository that contains the most copied non-binary Swift file in the dataset, ensuring each file is uniquely identified by its ID?","WITH selected_repos AS ( SELECT f.""id"", @@ -6290,7 +6290,7 @@ WHERE NOT c.""binary"" AND f.""path"" LIKE '%.swift' ORDER BY c.""copies"" DESC -LIMIT 1;",SAMPLE_CONTENTS.binary; SAMPLE_CONTENTS.copies; SAMPLE_CONTENTS.id; SAMPLE_FILES.id; SAMPLE_FILES.path; SAMPLE_FILES.repo_name,6,lite_sql,sf_bq252 +LIMIT 1;",SAMPLE_CONTENTS.binary; SAMPLE_CONTENTS.copies; SAMPLE_CONTENTS.id; SAMPLE_FILES.id; SAMPLE_FILES.path; SAMPLE_FILES.repo_name,6,34,lite_sql,sf_bq252 sf_bq254,GEO_OPENSTREETMAP,snowflake,"Can you find the names of the multipolygons with valid ids that rank in the top two in terms of the number of points within their boundaries, among those multipolygons that do not have a Wikidata tag but are located within the same geographic area as the multipolygon associated with Wikidata item Q191, analyzed through planet features?","WITH bounding_area AS ( SELECT ""geometry"" AS geometry FROM GEO_OPENSTREETMAP.GEO_OPENSTREETMAP.PLANET_FEATURES, @@ -6351,7 +6351,7 @@ WHERE wd.""osm_id"" IS NOT NULL AND baf.""feature_type"" = 'points' GROUP BY pww.name ORDER BY COUNT(baf.""osm_id"") DESC -LIMIT 2",PLANET_FEATURES.all_tags; PLANET_FEATURES.feature_type; PLANET_FEATURES.geometry; PLANET_FEATURES.osm_id,4,lite_sql,sf_bq254 +LIMIT 2",PLANET_FEATURES.all_tags; PLANET_FEATURES.feature_type; PLANET_FEATURES.geometry; PLANET_FEATURES.osm_id,4,86,lite_sql,sf_bq254 sf_bq255,GITHUB_REPOS,snowflake,"How many commit messages are there in repositories that use the 'Shell' programming language and 'apache-2.0' license, where the length of the commit message is more than 5 characters but less than 10,000 characters, and the messages do not start with the word 'merge', 'update' or 'test'?","SELECT COUNT(commits_table.""message"") AS ""num_messages"" FROM ( @@ -6381,7 +6381,7 @@ WHERE AND LENGTH(commits_table.""message"") < 10000 AND LOWER(commits_table.""message"") NOT LIKE 'update%' AND LOWER(commits_table.""message"") NOT LIKE 'test%' - AND LOWER(commits_table.""message"") NOT LIKE 'merge%';",LANGUAGES.language; LANGUAGES.repo_name; LICENSES.license; LICENSES.repo_name; SAMPLE_COMMITS.message; SAMPLE_COMMITS.repo_name,6,snow_sql_near_exact,sf_bq255 + AND LOWER(commits_table.""message"") NOT LIKE 'merge%';",LANGUAGES.language; LANGUAGES.repo_name; LICENSES.license; LICENSES.repo_name; SAMPLE_COMMITS.message; SAMPLE_COMMITS.repo_name,6,34,snow_sql_near_exact,sf_bq255 sf_bq260,THELOOK_ECOMMERCE,snowflake,"Find the total number of youngest and oldest users separately for each gender in the e-commerce platform created from January 1, 2019, to April 30, 2022.","WITH filtered_users AS ( SELECT ""first_name"", @@ -6450,7 +6450,7 @@ FROM GROUP BY ""tag"", ""gender"" ORDER BY - ""tag"", ""gender"";",USERS.age; USERS.created_at; USERS.gender,3,snow_sql_near_exact,sf_bq260 + ""tag"", ""gender"";",USERS.age; USERS.created_at; USERS.gender,3,73,snow_sql_near_exact,sf_bq260 sf_bq263,THELOOK_ECOMMERCE,snowflake,"Produce a 2023 monthly report for the 'Sleep & Lounge' category detailing total sales, costs, completed order counts, profits, and profit margins, ensuring accurate cost alignment with sales data.","WITH d AS ( SELECT a.""order_id"", @@ -6498,7 +6498,7 @@ SELECT DISTINCT FROM e ORDER BY - ""month"";",ORDERS.created_at; ORDERS.order_id; ORDERS.status; ORDER_ITEMS.order_id; ORDER_ITEMS.product_id; ORDER_ITEMS.sale_price; PRODUCTS.category; PRODUCTS.cost; PRODUCTS.id,9,snow_sql_near_exact,sf_bq263 + ""month"";",ORDERS.created_at; ORDERS.order_id; ORDERS.status; ORDER_ITEMS.order_id; ORDER_ITEMS.product_id; ORDER_ITEMS.sale_price; PRODUCTS.category; PRODUCTS.cost; PRODUCTS.id,9,73,snow_sql_near_exact,sf_bq263 sf_bq264,THELOOK_ECOMMERCE,snowflake,"Identify the difference in the number of the oldest and youngest users registered between January 1, 2019, and April 30, 2022, from our e-commerce platform data.","WITH youngest AS ( SELECT ""gender"", @@ -6547,7 +6547,7 @@ SELECT SUM(CASE WHEN ""age"" = (SELECT MAX(""age"") FROM ""THELOOK_ECOMMERCE"".""THELOOK_ECOMMERCE"".""USERS"") THEN 1 END) - SUM(CASE WHEN ""age"" = (SELECT MIN(""age"") FROM ""THELOOK_ECOMMERCE"".""THELOOK_ECOMMERCE"".""USERS"") THEN 1 END) AS ""diff"" FROM - TEMP_record;",USERS.age; USERS.created_at,2,snow_sql_near_exact,sf_bq264 + TEMP_record;",USERS.age; USERS.created_at,2,73,snow_sql_near_exact,sf_bq264 sf_bq265,THELOOK_ECOMMERCE,snowflake,"Can you provide me with the emails of the top 10 users who have the highest average order value, considering only those users who registered in 2019 and made purchases within the same year?","WITH main AS ( SELECT @@ -6647,7 +6647,7 @@ FROM kite ORDER BY ""avg_order_value"" DESC -LIMIT 10;",ORDERS.created_at; ORDERS.num_of_item; ORDERS.order_id; ORDERS.user_id; ORDER_ITEMS.created_at; ORDER_ITEMS.order_id; ORDER_ITEMS.product_id; ORDER_ITEMS.sale_price; ORDER_ITEMS.status; ORDER_ITEMS.user_id; USERS.country; USERS.created_at; USERS.email; USERS.gender; USERS.id; USERS.traffic_source,16,lite_sql,sf_bq265 +LIMIT 10;",ORDERS.created_at; ORDERS.num_of_item; ORDERS.order_id; ORDERS.user_id; ORDER_ITEMS.created_at; ORDER_ITEMS.order_id; ORDER_ITEMS.product_id; ORDER_ITEMS.sale_price; ORDER_ITEMS.status; ORDER_ITEMS.user_id; USERS.country; USERS.created_at; USERS.email; USERS.gender; USERS.id; USERS.traffic_source,16,73,lite_sql,sf_bq265 bq268,ga360,bigquery,Identify the longest number of days between the first visit and the last recorded event (either the last visit or the first transaction) for a user where the last recorded event was associated with a mobile device.,"WITH visit AS ( @@ -6689,7 +6689,7 @@ SELECT DATE_DIFF(PARSE_DATE('%Y%m%d',date_event), PARSE_DATE('%Y%m%d', date_firs FROM mortality_table WHERE device = 'mobile' ORDER BY DATE_DIFF(PARSE_DATE('%Y%m%d',date_event), PARSE_DATE('%Y%m%d', date_first_visit),DAY) DESC -LIMIT 1",ga_sessions_*.date; ga_sessions_*.device; ga_sessions_*.fullVisitorId; ga_sessions_*.hits,4,lite_sql,sf_bq268 +LIMIT 1",ga_sessions_*.date; ga_sessions_*.device; ga_sessions_*.fullVisitorId; ga_sessions_*.hits,4,16,lite_sql,sf_bq268 bq269,ga360,bigquery,Compute the average pageviews per visitor for non-purchase events and purchase events each month between June 1st and July 31st in 2017.,"WITH visitor_pageviews AS ( SELECT FORMAT_DATE('%Y%m', PARSE_DATE('%Y%m%d', date)) AS month, @@ -6723,7 +6723,7 @@ FROM GROUP BY month ORDER BY - month",ga_sessions_*.date; ga_sessions_*.fullVisitorId; ga_sessions_*.totals,3,lite_sql,sf_bq269 + month",ga_sessions_*.date; ga_sessions_*.fullVisitorId; ga_sessions_*.totals,3,16,lite_sql,sf_bq269 bq270,ga360,bigquery,"What were the monthly add-to-cart and purchase conversion rates, calculated as a percentage of pageviews on product details, from January to March 2017?","WITH cte1 AS (SELECT @@ -6765,7 +6765,7 @@ FROM cte1 USING(month) LEFT JOIN cte3 USING(month) -ORDER BY month;",ga_sessions_*.date; ga_sessions_*.hits,2,lite_sql,sf_bq270 +ORDER BY month;",ga_sessions_*.date; ga_sessions_*.hits,2,16,lite_sql,sf_bq270 sf_bq271,THELOOK_ECOMMERCE,snowflake,"Could you generate a report that, for each month in 2021, provides the number of orders, number of unique purchasers, and profit (calculated as total product retail price minus total cost) grouped by country, product department, and product category?","WITH orders_x_order_items AS ( SELECT orders.*, @@ -6812,7 +6812,7 @@ SELECT SUM(orders_x_users.""product_retail_price"") - SUM(orders_x_users.""cost"") AS ""profit"" FROM orders_x_users GROUP BY 1, 2, 3, 4 -ORDER BY ""reporting_month"";",INVENTORY_ITEMS.cost; INVENTORY_ITEMS.created_at; INVENTORY_ITEMS.id; INVENTORY_ITEMS.product_category; INVENTORY_ITEMS.product_department; INVENTORY_ITEMS.product_retail_price; ORDERS.created_at; ORDERS.order_id; ORDERS.user_id; ORDER_ITEMS.inventory_item_id; ORDER_ITEMS.order_id; USERS.country; USERS.created_at; USERS.id,14,snow_sql_near_exact,sf_bq271 +ORDER BY ""reporting_month"";",INVENTORY_ITEMS.cost; INVENTORY_ITEMS.created_at; INVENTORY_ITEMS.id; INVENTORY_ITEMS.product_category; INVENTORY_ITEMS.product_department; INVENTORY_ITEMS.product_retail_price; ORDERS.created_at; ORDERS.order_id; ORDERS.user_id; ORDER_ITEMS.inventory_item_id; ORDER_ITEMS.order_id; USERS.country; USERS.created_at; USERS.id,14,73,snow_sql_near_exact,sf_bq271 sf_bq273,THELOOK_ECOMMERCE,snowflake,Can you list the top 5 months from August 2022 to November 2023 where the profit from Facebook-sourced completed orders showed the largest month-over-month increase? Calculate profit as sales minus costs.,"WITH orders AS ( SELECT @@ -6891,7 +6891,7 @@ LEFT JOIN monthly_sales AS previous_month AND current_month.""delivery_month"" = DATEADD(MONTH, -1, previous_month.""delivery_month"") -- Correctly join to previous month WHERE current_month.""delivery_month"" >= '2022-08-01' -- Only show August and later data, but use July for calculation ORDER BY ""profit_vs_prior_month"" DESC -LIMIT 5;",ORDERS.created_at; ORDERS.delivered_at; ORDERS.order_id; ORDERS.status; ORDERS.user_id; ORDER_ITEMS.order_id; ORDER_ITEMS.product_id; ORDER_ITEMS.sale_price; PRODUCTS.cost; PRODUCTS.id; USERS.id; USERS.traffic_source,12,lite_sql,sf_bq273 +LIMIT 5;",ORDERS.created_at; ORDERS.delivered_at; ORDERS.order_id; ORDERS.status; ORDERS.user_id; ORDER_ITEMS.order_id; ORDER_ITEMS.product_id; ORDER_ITEMS.sale_price; PRODUCTS.cost; PRODUCTS.id; USERS.id; USERS.traffic_source,12,73,lite_sql,sf_bq273 bq275,ga360,bigquery,Can you provide a list of visitor IDs for those who made their first transaction on a mobile device on a different day than their first visit?,"WITH visit AS ( SELECT fullvisitorid, MIN(date) AS date_first_visit @@ -6925,7 +6925,7 @@ bq275,ga360,bigquery,Can you provide a list of visitor IDs for those who made th SELECT fullvisitorid FROM visits_transactions WHERE DATE_DIFF(PARSE_DATE('%Y%m%d', date_transactions), PARSE_DATE('%Y%m%d', date_first_visit), DAY) > 0 -AND device_transaction = ""mobile"";",ga_sessions_*.date; ga_sessions_*.device; ga_sessions_*.fullVisitorId; ga_sessions_*.hits,4,lite_sql,sf_bq275 +AND device_transaction = ""mobile"";",ga_sessions_*.date; ga_sessions_*.device; ga_sessions_*.fullVisitorId; ga_sessions_*.hits,4,16,lite_sql,sf_bq275 bq279,austin,bigquery,Can you provide the number of distinct active and closed bike share stations for each year 2013 and 2014?,"SELECT t.year, CASE @@ -7000,7 +7000,7 @@ WHERE GROUP BY t.year ORDER BY - t.year",bikeshare_stations.station_id; bikeshare_stations.status; bikeshare_trips.start_station_id; bikeshare_trips.start_time,4,lite_sql,sf_bq279 + t.year",bikeshare_stations.station_id; bikeshare_stations.status; bikeshare_trips.start_station_id; bikeshare_trips.start_time,4,81,lite_sql,sf_bq279 bq280,stackoverflow,bigquery,"Please provide the display name of the user who has answered the most questions on Stack Overflow, considering only users with a reputation greater than 10.","WITH UserAnswers AS ( SELECT owner_user_id AS answer_owner_id, @@ -7029,7 +7029,7 @@ RankedUsers AS ( SELECT user_display_name, FROM RankedUsers -WHERE rank = 1;",posts_answers.id; posts_answers.owner_user_id; users.display_name; users.id; users.reputation,5,lite_sql,sf_bq280 +WHERE rank = 1;",posts_answers.id; posts_answers.owner_user_id; users.display_name; users.id; users.reputation,5,228,lite_sql,sf_bq280 bq281,austin,bigquery,"What is the highest number of electric bike rides lasting more than 10 minutes taken by subscribers with 'Student Membership' in a single day, excluding rides starting or ending at 'Mobile Station' or 'Repair Shop'?","SELECT COUNT(1) AS num_rides FROM @@ -7051,7 +7051,7 @@ GROUP BY EXTRACT(MONTH from start_time), EXTRACT(DAY from start_time) ORDER BY num_rides DESC -LIMIT 1",bikeshare_trips.bike_type; bikeshare_trips.duration_minutes; bikeshare_trips.end_station_name; bikeshare_trips.start_station_name; bikeshare_trips.start_time; bikeshare_trips.subscriber_type,6,lite_sql,sf_bq281 +LIMIT 1",bikeshare_trips.bike_type; bikeshare_trips.duration_minutes; bikeshare_trips.end_station_name; bikeshare_trips.start_station_name; bikeshare_trips.start_time; bikeshare_trips.subscriber_type,6,81,lite_sql,sf_bq281 bq282,austin,bigquery,"Can you tell me the numeric value of the active council district in Austin which has the highest number of bike trips that start and end within the same district, but not at the same station?","SELECT district FROM ( @@ -7082,7 +7082,7 @@ FROM ( ) GROUP BY district ORDER BY COUNT(*) DESC -LIMIT 1;",bikeshare_stations.council_district; bikeshare_stations.station_id; bikeshare_stations.status; bikeshare_trips.end_station_id; bikeshare_trips.start_station_id,5,lite_sql,sf_bq282 +LIMIT 1;",bikeshare_stations.council_district; bikeshare_stations.station_id; bikeshare_stations.status; bikeshare_trips.end_station_id; bikeshare_trips.start_station_id,5,81,lite_sql,sf_bq282 bq284,bbc,bigquery,"Can you provide a breakdown of the total number of articles into different categories and the percentage of those articles that mention ""education"" within each category from the BBC News?","SELECT category, COUNT(*) AS number_total_by_category, @@ -7125,7 +7125,7 @@ bq284,bbc,bigquery,"Can you provide a breakdown of the total number of articles END AS percent_education FROM `bigquery-public-data.bbc_news.fulltext` GROUP BY - category;",fulltext.body; fulltext.category,2,lite_sql,sf_bq284 + category;",fulltext.body; fulltext.category,2,4,lite_sql,sf_bq284 bq285,fda,bigquery,Could you provide me with the zip code of the location that has the highest number of bank institutions in Florida?,"with _fips AS ( SELECT @@ -7175,7 +7175,7 @@ bq285,fda,bigquery,Could you provide me with the zip code of the location that h z.zip_code ORDER BY SUM(l.count_locations) DESC - LIMIT 1;",fips_codes_states.state_fips_code; fips_codes_states.state_name; institutions.fdic_certificate_number; institutions.institution_name; institutions.state_fips_code; zip_codes.state_fips_code; zip_codes.state_name; zip_codes.zip_code,8,lite_sql,sf_bq285 + LIMIT 1;",fips_codes_states.state_fips_code; fips_codes_states.state_name; institutions.fdic_certificate_number; institutions.institution_name; institutions.state_fips_code; zip_codes.state_fips_code; zip_codes.state_name; zip_codes.zip_code,8,417,lite_sql,sf_bq285 bq286,usa_names,bigquery,"Can you tell me the name of the most popular female baby in Wyoming for the year 2021, based on the proportion of female babies given that name compared to the total number of female babies given the same name across all states?","SELECT a.name AS name FROM @@ -7201,7 +7201,7 @@ WHERE a.state = 'WY' AND a.year = 2021 ORDER BY (a.number / b.total_number) DESC -LIMIT 1",usa_1910_current.gender; usa_1910_current.name; usa_1910_current.number; usa_1910_current.state; usa_1910_current.year,5,lite_sql,sf_bq286 +LIMIT 1",usa_1910_current.gender; usa_1910_current.name; usa_1910_current.number; usa_1910_current.state; usa_1910_current.year,5,10,lite_sql,sf_bq286 sf_bq289,GEO_OPENSTREETMAP_CENSUS_PLACES,snowflake,"Can you find the shortest distance between any two amenities (either a library, place of worship, or community center) located within Philadelphia, analyzed through pennsylvania table and planet features points?","WITH philadelphia AS ( SELECT * @@ -7241,7 +7241,7 @@ SELECT distance FROM joiin WHERE row_num = 1 ORDER BY distance ASC -LIMIT 1;",PLACES_PENNSYLVANIA.place_geom; PLACES_PENNSYLVANIA.place_name; PLANET_FEATURES_POINTS.all_tags; PLANET_FEATURES_POINTS.geometry; PLANET_FEATURES_POINTS.osm_id,5,snow_sql_near_exact,sf_bq289 +LIMIT 1;",PLACES_PENNSYLVANIA.place_geom; PLACES_PENNSYLVANIA.place_name; PLANET_FEATURES_POINTS.all_tags; PLANET_FEATURES_POINTS.geometry; PLANET_FEATURES_POINTS.osm_id,5,1056,snow_sql_near_exact,sf_bq289 bq290,noaa_data,bigquery,"Can you calculate the difference in maximum temperature, minimum temperature, and average temperature between US and UK weather stations for each day in October 2023, excluding records with missing temperature values?","with stations_selected as ( @@ -7325,7 +7325,7 @@ select from temp_differences order by - metric_date;",gsod_*.date; gsod_*.stn; gsod_*.temp; gsod_*.wban; stations.country; stations.name; stations.usaf; stations.wban,8,lite_sql,sf_bq290 + metric_date;",gsod_*.date; gsod_*.stn; gsod_*.temp; gsod_*.wban; stations.country; stations.name; stations.usaf; stations.wban,8,739,lite_sql,sf_bq290 sf_bq291,NOAA_GLOBAL_FORECAST_SYSTEM,snowflake,"Can you provide a daily weather summary for July 2019 within a 5 km radius of latitude 26.75 and longitude 51.5? I need the maximum, minimum, and average temperatures; total precipitation; average cloud cover between 10 AM and 5 PM; total snowfall (when average temperature is below 32°F); and total rainfall (when average temperature is 32°F or above) for each forecast date. The data should correspond to forecasts created in July 2019 for the following day.","WITH daily_forecasts AS ( SELECT ""TRI"".""creation_time"", @@ -7419,7 +7419,7 @@ FROM daily_forecasts ORDER BY ""creation_time"", - ""forecast_date"";",NOAA_GFS0P25.creation_time; NOAA_GFS0P25.forecast; NOAA_GFS0P25.geography,3,lite_sql,sf_bq291 + ""forecast_date"";",NOAA_GFS0P25.creation_time; NOAA_GFS0P25.forecast; NOAA_GFS0P25.geography,3,90,lite_sql,sf_bq291 sf_bq294,SAN_FRANCISCO_PLUS,snowflake,"Can you provide the details of the top 5 longest bike share trips that started during the second half of 2017, including the trip ID, duration in seconds, start date, start station name, route (start station to end station), bike number, subscriber type, member's birth year, current age, age classification, gender, and the region name of the start station? Please exclude trips where the start station name, member's birth year, or member's gender is not specified.","SELECT ""trip_id"", ""duration_sec"", @@ -7447,7 +7447,7 @@ WHERE TO_TIMESTAMP_LTZ(""start_date"" / 1000000) BETWEEN '2017-07-01' AND '2017- AND ""member_birth_year"" IS NOT NULL AND ""member_gender"" IS NOT NULL ORDER BY ""duration_sec"" DESC -LIMIT 5;",BIKESHARE_REGIONS.name; BIKESHARE_REGIONS.region_id; BIKESHARE_STATION_INFO.region_id; BIKESHARE_STATION_INFO.station_id; BIKESHARE_TRIPS.bike_number; BIKESHARE_TRIPS.duration_sec; BIKESHARE_TRIPS.end_station_name; BIKESHARE_TRIPS.member_birth_year; BIKESHARE_TRIPS.member_gender; BIKESHARE_TRIPS.start_date; BIKESHARE_TRIPS.start_station_id; BIKESHARE_TRIPS.start_station_name; BIKESHARE_TRIPS.subscriber_type; BIKESHARE_TRIPS.trip_id,14,snow_sql_near_exact,sf_bq294 +LIMIT 5;",BIKESHARE_REGIONS.name; BIKESHARE_REGIONS.region_id; BIKESHARE_STATION_INFO.region_id; BIKESHARE_STATION_INFO.station_id; BIKESHARE_TRIPS.bike_number; BIKESHARE_TRIPS.duration_sec; BIKESHARE_TRIPS.end_station_name; BIKESHARE_TRIPS.member_birth_year; BIKESHARE_TRIPS.member_gender; BIKESHARE_TRIPS.start_date; BIKESHARE_TRIPS.start_station_id; BIKESHARE_TRIPS.start_station_name; BIKESHARE_TRIPS.subscriber_type; BIKESHARE_TRIPS.trip_id,14,278,snow_sql_near_exact,sf_bq294 sf_bq295,GITHUB_REPOS_DATE,snowflake,"Among the repositories from the GitHub Archive which include a Python file with less than 15,000 bytes in size and a keyword 'def' in the content, find the top 3 that have the highest number of watch events in 2017?","WITH watched_repos AS ( SELECT PARSE_JSON(""repo""):""name""::STRING AS ""repo"" @@ -7564,7 +7564,7 @@ GROUP BY ORDER BY r.""watch_count"" DESC LIMIT - 3;",SAMPLE_CONTENTS.content; SAMPLE_CONTENTS.sample_path; SAMPLE_CONTENTS.sample_repo_name; SAMPLE_CONTENTS.size; _2017_*.repo; _2017_*.type,6,snow_sql_near_exact,sf_bq295 + 3;",SAMPLE_CONTENTS.content; SAMPLE_CONTENTS.sample_path; SAMPLE_CONTENTS.sample_repo_name; SAMPLE_CONTENTS.size; _2017_*.repo; _2017_*.type,6,43,snow_sql_near_exact,sf_bq295 bq300,stackoverflow,bigquery,"What is the highest number of answers received for a single Python 2 specific question on Stack Overflow, excluding any discussions that involve Python 3?","WITH python2_questions AS ( SELECT @@ -7601,7 +7601,7 @@ ON q.question_id = a.parent_id GROUP BY q.question_id ORDER BY count_number DESC -LIMIT 1",posts_answers.parent_id; posts_questions.body; posts_questions.id; posts_questions.tags; posts_questions.title,5,lite_sql,sf_bq300 +LIMIT 1",posts_answers.parent_id; posts_questions.body; posts_questions.id; posts_questions.tags; posts_questions.title,5,228,lite_sql,sf_bq300 bq301,stackoverflow,bigquery,"Retrieve details of accepted answers related to JavaScript security topics such as XSS, cross-site scripting, exploits, and cybersecurity, for questions posted in January 2016 on Stack Overflow. For each accepted answer, include the answer's ID, the answerer's reputation, score, and comment count, along with the associated question's tags, score, answer count, the asker's reputation, view count, and comment count.","SELECT answer.id AS a_id, (SELECT users.reputation FROM `bigquery-public-data.stackoverflow.users` users @@ -7631,7 +7631,7 @@ WHERE questions.tags LIKE '%cybersecurity%') ) AND DATE(questions.creation_date) BETWEEN '2016-01-01' AND '2016-01-31' - AND DATE(answer.creation_date) BETWEEN '2016-01-01' AND '2016-01-31'",posts_answers.comment_count; posts_answers.creation_date; posts_answers.id; posts_answers.owner_user_id; posts_answers.parent_id; posts_answers.score; posts_questions.accepted_answer_id; posts_questions.answer_count; posts_questions.comment_count; posts_questions.creation_date; posts_questions.id; posts_questions.owner_user_id; posts_questions.score; posts_questions.tags; posts_questions.view_count; users.id; users.reputation,17,lite_sql,sf_bq301 + AND DATE(answer.creation_date) BETWEEN '2016-01-01' AND '2016-01-31'",posts_answers.comment_count; posts_answers.creation_date; posts_answers.id; posts_answers.owner_user_id; posts_answers.parent_id; posts_answers.score; posts_questions.accepted_answer_id; posts_questions.answer_count; posts_questions.comment_count; posts_questions.creation_date; posts_questions.id; posts_questions.owner_user_id; posts_questions.score; posts_questions.tags; posts_questions.view_count; users.id; users.reputation,17,228,lite_sql,sf_bq301 bq302,stackoverflow,bigquery,What is the monthly proportion of Stack Overflow questions tagged with 'python' in the year 2022?,"WITH -- Get recent data RecentData AS ( @@ -7678,7 +7678,7 @@ FROM LEFT JOIN MonthlyQuestions b ON a.month_index = b.month_index ORDER BY - a.month_index, proportion DESC;",posts_questions.creation_date; posts_questions.tags,2,lite_sql,sf_bq302 + a.month_index, proportion DESC;",posts_questions.creation_date; posts_questions.tags,2,228,lite_sql,sf_bq302 bq303,stackoverflow,bigquery,"What are the user IDs and tags for comments, answers, and questions posted by users with IDs between 16712208 and 18712208 on Stack Overflow during July to December 2019?","SELECT u_id, tags FROM ( -- select comments with tags from the post @@ -7715,7 +7715,7 @@ FROM ( WHERE pq.owner_user_id BETWEEN 16712208 AND 18712208 AND DATE(pq.creation_date) BETWEEN '2019-07-01' AND '2019-12-31' ) -ORDER BY u_id, creation_date;",comments.creation_date; comments.post_id; comments.text; comments.user_id; posts_answers.body; posts_answers.creation_date; posts_answers.id; posts_answers.owner_user_id; posts_answers.parent_id; posts_questions.body; posts_questions.creation_date; posts_questions.id; posts_questions.owner_user_id; posts_questions.tags,14,lite_sql,sf_bq303 +ORDER BY u_id, creation_date;",comments.creation_date; comments.post_id; comments.text; comments.user_id; posts_answers.body; posts_answers.creation_date; posts_answers.id; posts_answers.owner_user_id; posts_answers.parent_id; posts_questions.body; posts_questions.creation_date; posts_questions.id; posts_questions.owner_user_id; posts_questions.tags,14,228,lite_sql,sf_bq303 bq304,stackoverflow,bigquery,"What are the top 50 most viewed 'how' questions for each of the following Android-related tags on StackOverflow: 'android-layout', 'android-activity', 'android-intent', 'android-edittext', 'android-fragments', 'android-recyclerview', 'listview', 'android-actionbar', 'google-maps', and 'android-asynctask'? Ensure that each tag has at least 50 questions and exclude any questions containing terms typically associated with troubleshooting, such as 'fail', 'problem', 'error', 'wrong', 'fix', 'bug', 'issue', 'solve', or 'trouble'.","WITH tags_to_use AS ( SELECT tag, idx @@ -7777,7 +7777,7 @@ FROM WHERE question_view_count_rank <= 50 AND total_valid_questions >= 50 ORDER BY - tag_offset ASC, question_view_count_rank ASC;",posts_questions.body; posts_questions.id; posts_questions.tags; posts_questions.title; posts_questions.view_count; tags.id; tags.tag_name; tags.wiki_post_id,8,lite_sql,sf_bq304 + tag_offset ASC, question_view_count_rank ASC;",posts_questions.body; posts_questions.id; posts_questions.tags; posts_questions.title; posts_questions.view_count; tags.id; tags.tag_name; tags.wiki_post_id,8,228,lite_sql,sf_bq304 bq308,stackoverflow,bigquery,"Show the number of Stack Overflow questions asked each day of the week in 2021, and find out how many and what percentage of those were answered within one hour.","SELECT Day_of_Week, COUNT(1) AS Num_Questions, @@ -7802,7 +7802,7 @@ FROM GROUP BY Day_of_Week ORDER BY - Day_of_Week;",posts_answers.creation_date; posts_answers.parent_id; posts_questions.creation_date; posts_questions.id,4,lite_sql,sf_bq308 + Day_of_Week;",posts_answers.creation_date; posts_answers.parent_id; posts_questions.creation_date; posts_questions.id,4,228,lite_sql,sf_bq308 bq309,stackoverflow,bigquery,"Show the top 10 longest Stack Overflow questions where the question has an accepted answer or an answer with a score-to-view ratio above 0.01, including the user's reputation, net votes, and badge count.","WITH badge_counts AS ( SELECT c.id, @@ -7860,7 +7860,7 @@ WHERE ORDER BY lq.body_length DESC LIMIT - 10;",badges.id; badges.user_id; posts_answers.parent_id; posts_answers.score; posts_questions.accepted_answer_id; posts_questions.body; posts_questions.id; posts_questions.owner_user_id; posts_questions.view_count; users.down_votes; users.id; users.reputation; users.up_votes,13,lite_sql,sf_bq309 + 10;",badges.id; badges.user_id; posts_answers.parent_id; posts_answers.score; posts_questions.accepted_answer_id; posts_questions.body; posts_questions.id; posts_questions.owner_user_id; posts_questions.view_count; users.down_votes; users.id; users.reputation; users.up_votes,13,228,lite_sql,sf_bq309 bq310,stackoverflow,bigquery,"What is the title of the most viewed ""how"" question related to Android development on StackOverflow, across specified tags such as 'android-layout', 'android-activity', 'android-intent', and others","WITH tags_to_use AS ( SELECT tag, idx @@ -7910,7 +7910,7 @@ most_viewed_question AS ( SELECT title FROM - most_viewed_question;",posts_questions.body; posts_questions.id; posts_questions.tags; posts_questions.title; posts_questions.view_count; tags.id; tags.tag_name,7,lite_sql,sf_bq310 + most_viewed_question;",posts_questions.body; posts_questions.id; posts_questions.tags; posts_questions.title; posts_questions.view_count; tags.id; tags.tag_name,7,228,lite_sql,sf_bq310 sf_bq320,IDC,snowflake,What is the total count of StudyInstanceUIDs that have a segmented property type of '15825003' and belong to the 'Community' or 'nsclc_radiomics' collections?,"SELECT COUNT(*) AS ""total_count"" FROM @@ -7943,7 +7943,7 @@ WHERE ) GROUP BY ""StudyInstanceUID"" - );",DICOM_PIVOT.SegmentedPropertyTypeCodeSequence; DICOM_PIVOT.StudyInstanceUID; DICOM_PIVOT.collection_id,3,snow_sql_near_exact,sf_bq320 + );",DICOM_PIVOT.SegmentedPropertyTypeCodeSequence; DICOM_PIVOT.StudyInstanceUID; DICOM_PIVOT.collection_id,3,2100,snow_sql_near_exact,sf_bq320 sf_bq321,IDC,snowflake,"How many unique StudyInstanceUIDs are there from the DWI, T2 Weighted Axial, Apparent Diffusion Coefficient series, and T2 Weighted Axial Segmentations in the 'qin_prostate_repeatability' collection?","WITH relevant_series AS ( SELECT DISTINCT ""StudyInstanceUID"" @@ -7980,7 +7980,7 @@ FROM ( SELECT ""StudyInstanceUID"" FROM t2_seg_lesion_series -);",DICOM_PIVOT.SeriesDescription; DICOM_PIVOT.StudyInstanceUID; DICOM_PIVOT.collection_id,3,snow_sql_near_exact,sf_bq321 +);",DICOM_PIVOT.SeriesDescription; DICOM_PIVOT.StudyInstanceUID; DICOM_PIVOT.collection_id,3,2100,snow_sql_near_exact,sf_bq321 bq327,world_bank,bigquery,"How many debt indicators for Russia have a value of 0, excluding NULL values?","WITH russia_Data AS ( SELECT DISTINCT id.country_name, @@ -8016,7 +8016,7 @@ SELECT FROM russia_Data WHERE - value = 0;",country_summary.country_code; country_summary.region; international_*.country_code; international_*.country_name; international_*.indicator_name; international_*.value,6,lite_sql,sf_bq327 + value = 0;",country_summary.country_code; country_summary.region; international_*.country_code; international_*.country_name; international_*.indicator_name; international_*.value,6,152,lite_sql,sf_bq327 bq328,world_bank,bigquery,Which region has the highest median GDP (constant 2015 US$) value?,"WITH country_data AS ( -- CTE for country descriptive data SELECT @@ -8058,7 +8058,7 @@ SELECT FROM cal_median_gdp ORDER BY median_gdp DESC -LIMIT 1;",country_summary.country_code; country_summary.income_group; country_summary.region; country_summary.short_name; indicators_data.country_code; indicators_data.indicator_code; indicators_data.value,7,lite_sql,sf_bq328 +LIMIT 1;",country_summary.country_code; country_summary.income_group; country_summary.region; country_summary.short_name; indicators_data.country_code; indicators_data.indicator_code; indicators_data.value,7,152,lite_sql,sf_bq328 bq330,fda,bigquery,"Which Colorado zip code has the highest concentration of bank locations per block group, based on the overlap between zip codes and block groups?","WITH _fips AS ( SELECT state_fips_code @@ -8131,7 +8131,7 @@ GROUP BY l.zip_code ORDER BY MAX(locations_per_bg) DESC -LIMIT 1;",fips_codes_states.state_fips_code; fips_codes_states.state_name; locations.state_name; us_blockgroups_national.blockgroup_geom; us_blockgroups_national.geo_id; us_blockgroups_national.state_fips_code; zip_codes.state_fips_code; zip_codes.zip_code; zip_codes.zip_code_geom,9,lite_sql,sf_bq330 +LIMIT 1;",fips_codes_states.state_fips_code; fips_codes_states.state_name; locations.state_name; us_blockgroups_national.blockgroup_geom; us_blockgroups_national.geo_id; us_blockgroups_national.state_fips_code; zip_codes.state_fips_code; zip_codes.zip_code; zip_codes.zip_code_geom,9,417,lite_sql,sf_bq330 sf_bq334,CRYPTO,snowflake,"In my Bitcoin database, there are discrepancies in transaction records. Can you determine the annual differences in average output values calculated from separate input and output records versus a consolidated transactions table, focusing only on the years common to both calculation methods?","WITH all_transactions AS ( SELECT TO_TIMESTAMP_NTZ(""block_timestamp"" / 1000000) AS ""timestamp"", -- 将时间戳转换为日期时间格式 @@ -8190,7 +8190,7 @@ SELECT FROM common_years ORDER BY - ""year"";",INPUTS.block_timestamp; INPUTS.value; OUTPUTS.block_timestamp; OUTPUTS.value; TRANSACTIONS.block_timestamp; TRANSACTIONS.output_value,6,snow_sql_near_exact,sf_bq334 + ""year"";",INPUTS.block_timestamp; INPUTS.value; OUTPUTS.block_timestamp; OUTPUTS.value; TRANSACTIONS.block_timestamp; TRANSACTIONS.output_value,6,286,snow_sql_near_exact,sf_bq334 bq338,census_bureau_acs_1,bigquery,"Can you find the census tracts in the 36047 area that made both the top 20 lists for biggest population and median income increases from 2011 to 2018, and had over 1000 residents each year?","WITH population_change AS ( SELECT a.geo_id, @@ -8259,7 +8259,7 @@ common_geoids AS ( JOIN acs_diff ON population_change.geo_id = acs_diff.geo_id ) -SELECT geo_id FROM common_geoids;",censustract_*.geo_id; censustract_*.median_income; censustract_*.total_pop,3,lite_sql,sf_bq338 +SELECT geo_id FROM common_geoids;",censustract_*.geo_id; censustract_*.median_income; censustract_*.total_pop,3,4373,lite_sql,sf_bq338 bq339,san_francisco_plus,bigquery,Which month in 2017 had the largest absolute difference between cumulative bike usage minutes for customers and subscribers?,"WITH monthly_totals AS ( SELECT SUM(CASE WHEN subscriber_type = 'Customer' THEN duration_sec / 60 ELSE NULL END) AS customer_minutes_sum, @@ -8296,7 +8296,7 @@ FROM differences ORDER BY abs_diff DESC -LIMIT 1;",bikeshare_trips.duration_sec; bikeshare_trips.end_date; bikeshare_trips.subscriber_type,3,lite_sql,sf_bq339 +LIMIT 1;",bikeshare_trips.duration_sec; bikeshare_trips.end_date; bikeshare_trips.subscriber_type,3,278,lite_sql,sf_bq339 sf_bq341,CRYPTO,snowflake,"Which Ethereum address has the top 3 smallest positive balance from transactions involving the token at address ""0xa92a861fc11b99b24296af880011b47f9cafb5ab""?","WITH transaction_addresses AS ( SELECT ""from_address"", @@ -8354,7 +8354,7 @@ HAVING SUM(""total_value"") > 0 ORDER BY SUM(""total_value"") ASC -LIMIT 3;",TOKEN_TRANSFERS.from_address; TOKEN_TRANSFERS.to_address; TOKEN_TRANSFERS.token_address; TOKEN_TRANSFERS.value,4,snow_sql_near_exact,sf_bq341 +LIMIT 3;",TOKEN_TRANSFERS.from_address; TOKEN_TRANSFERS.to_address; TOKEN_TRANSFERS.token_address; TOKEN_TRANSFERS.value,4,286,snow_sql_near_exact,sf_bq341 sf_bq345,IDC,snowflake,"How large are the DICOM image files with SEG or RTSTRUCT modalities and the SOP Class UID ""1.2.840.10008.5.1.4.1.1.66.4"", when grouped by collection, study, and series IDs, if they have no references to other series, images, or sources? Can you also provide a viewer URL formatted as ""https://viewer.imaging.datacommons.cancer.gov/viewer/"" followed by the study ID, and list these sizes in kilobytes, sorted from largest to smallest?","WITH seg_rtstruct AS ( SELECT ""collection_id"", @@ -8386,7 +8386,7 @@ GROUP BY seg_rtstruct.""StudyInstanceUID"", seg_rtstruct.""viewer_url"" ORDER BY - ""collection_size_KB"" DESC;",DICOM_ALL.Modality; DICOM_ALL.ReferencedImageSequence; DICOM_ALL.ReferencedSeriesSequence; DICOM_ALL.SOPClassUID; DICOM_ALL.SeriesInstanceUID; DICOM_ALL.SourceImageSequence; DICOM_ALL.StudyInstanceUID; DICOM_ALL.collection_id; DICOM_ALL.instance_size,9,snow_sql_near_exact,sf_bq345 + ""collection_size_KB"" DESC;",DICOM_ALL.Modality; DICOM_ALL.ReferencedImageSequence; DICOM_ALL.ReferencedSeriesSequence; DICOM_ALL.SOPClassUID; DICOM_ALL.SeriesInstanceUID; DICOM_ALL.SourceImageSequence; DICOM_ALL.StudyInstanceUID; DICOM_ALL.collection_id; DICOM_ALL.instance_size,9,2100,snow_sql_near_exact,sf_bq345 sf_bq346,IDC,snowflake,"Which five segmentation categories appear most frequently in publicly accessible DICOM SEG data, where the modality is ""SEG"" and the SOPClassUID is ""1.2.840.10008.5.1.4.1.1.66.4""?","WITH sampled_sops AS ( SELECT @@ -8433,7 +8433,7 @@ GROUP BY ""segmentation_category"" ORDER BY ""count_"" DESC -LIMIT 5;",DICOM_ALL.Modality; DICOM_ALL.ReferencedSeriesSequence; DICOM_ALL.SOPClassUID; DICOM_ALL.SOPInstanceUID; DICOM_ALL.SeriesDescription; DICOM_ALL.SeriesInstanceUID; SEGMENTATIONS.SOPInstanceUID; SEGMENTATIONS.SegmentedPropertyCategory; SEGMENTATIONS.SegmentedPropertyType,9,lite_sql,sf_bq346 +LIMIT 5;",DICOM_ALL.Modality; DICOM_ALL.ReferencedSeriesSequence; DICOM_ALL.SOPClassUID; DICOM_ALL.SOPInstanceUID; DICOM_ALL.SeriesDescription; DICOM_ALL.SeriesInstanceUID; SEGMENTATIONS.SOPInstanceUID; SEGMENTATIONS.SegmentedPropertyCategory; SEGMENTATIONS.SegmentedPropertyType,9,2100,lite_sql,sf_bq346 sf_bq347,IDC,snowflake,"Which modality has the highest count of SOP instances, including MR series with SeriesInstanceUID = ""1.3.6.1.4.1.14519.5.2.1.3671.4754.105976129314091491952445656147"" and all associated segmentation data, along with the total count of instances?","WITH union_mr_seg AS ( SELECT ""dicom_all_mr"".""SOPInstanceUID"", @@ -8471,7 +8471,7 @@ GROUP BY ""dc_all"".""Modality"" ORDER BY ""count_"" DESC -LIMIT 1;",DICOM_ALL.Modality; DICOM_ALL.SeriesInstanceUID; SEGMENTATIONS.SeriesInstanceUID; SEGMENTATIONS.segmented_SeriesInstanceUID,4,snow_sql_near_exact,sf_bq347 +LIMIT 1;",DICOM_ALL.Modality; DICOM_ALL.SeriesInstanceUID; SEGMENTATIONS.SeriesInstanceUID; SEGMENTATIONS.segmented_SeriesInstanceUID,4,2100,snow_sql_near_exact,sf_bq347 sf_bq349,GEO_OPENSTREETMAP,snowflake,"Which OpenStreetMap ID from the planet features table corresponds to an administrative boundary, represented as multipolygons, whose total number of 'amenity'-tagged Points of Interest (POIs), as derived from the planet nodes table, is closest to the median count among all such boundaries?","WITH bounding_area AS ( SELECT ""osm_id"", @@ -8527,7 +8527,7 @@ SELECT ""osm_id"" FROM closest_to_median ORDER BY diff_from_median -LIMIT 1;",PLANET_FEATURES.all_tags; PLANET_FEATURES.feature_type; PLANET_FEATURES.geometry; PLANET_FEATURES.osm_id; PLANET_NODES.all_tags; PLANET_NODES.geometry; PLANET_NODES.id,7,lite_sql,sf_bq349 +LIMIT 1;",PLANET_FEATURES.all_tags; PLANET_FEATURES.feature_type; PLANET_FEATURES.geometry; PLANET_FEATURES.osm_id; PLANET_NODES.all_tags; PLANET_NODES.geometry; PLANET_NODES.id,7,86,lite_sql,sf_bq349 bq350,open_targets_platform_1,bigquery,"For the detailed molecule data, Please display the drug id, drug type and withdrawal status for approved drugs with a black box warning and known drug type among 'Keytruda', 'Vioxx', 'Premarin', and 'Humira'","DECLARE my_drug_list ARRAY; SET @@ -8549,7 +8549,7 @@ WHERE tradeNameList.element IN UNNEST(my_drug_list) AND isApproved = TRUE AND blackBoxWarning = TRUE - AND drugType != 'Unknown';",molecule.blackBoxWarning; molecule.drugType; molecule.hasBeenWithdrawn; molecule.id; molecule.isApproved; molecule.tradeNames,6,lite_sql,sf_bq350 + AND drugType != 'Unknown';",molecule.blackBoxWarning; molecule.drugType; molecule.hasBeenWithdrawn; molecule.id; molecule.isApproved; molecule.tradeNames,6,332,lite_sql,sf_bq350 bq352,sdoh,bigquery,Please list the average number of prenatal weeks in 2018 for counties in Wisconsin where more than 5% of the employed population had commutes of 45-59 minutes in 2017.,"WITH natality_2018 AS ( SELECT County_of_Residence_FIPS AS FIPS, Ave_Number_of_Prenatal_Wks AS Vist_Ave, County_of_Residence FROM `bigquery-public-data.sdoh_cdc_wonder_natality.county_natality` @@ -8573,7 +8573,7 @@ corr_tbl AS ( SELECT County_of_Residence, Vist_Ave FROM corr_tbl -WHERE percent_high_travel > 5",county_*.commute_45_59_mins; county_*.employed_pop; county_*.geo_id; county_natality.Ave_Number_of_Prenatal_Wks; county_natality.County_of_Residence; county_natality.County_of_Residence_FIPS; county_natality.Year,7,lite_sql,sf_bq352 +WHERE percent_high_travel > 5",county_*.commute_45_59_mins; county_*.employed_pop; county_*.geo_id; county_natality.Ave_Number_of_Prenatal_Wks; county_natality.County_of_Residence; county_natality.County_of_Residence_FIPS; county_natality.Year,7,4068,lite_sql,sf_bq352 bq354,cms_data,bigquery,"Could you provide the percentage of participants for standard acne, atopic dermatitis, psoriasis, and vitiligo defined by the International Classification of Diseases 10-CM(ICD-10-CM), including their subcategories? The ICD-10 codes are: Acne (L70), Atopic dermatitis (L20), Psoriasis (L40), and Vitiligo (L80). ","WITH skin_condition_ICD_concept_ids AS ( SELECT concept_id, @@ -8656,7 +8656,7 @@ SELECT 100 * p.nb_of_participants_with_skin_condition / t.nb_of_participants AS percentage_of_participants FROM participants_with_condition p, - total_participants t",concept.concept_code; concept.concept_id; concept.standard_concept; concept.vocabulary_id; concept_ancestor.ancestor_concept_id; concept_ancestor.descendant_concept_id; concept_relationship.concept_id_1; concept_relationship.concept_id_2; concept_relationship.relationship_id; condition_occurrence.condition_concept_id; condition_occurrence.person_id; person.person_id,12,lite_sql,sf_bq354 + total_participants t",concept.concept_code; concept.concept_id; concept.standard_concept; concept.vocabulary_id; concept_ancestor.ancestor_concept_id; concept_ancestor.descendant_concept_id; concept_relationship.concept_id_1; concept_relationship.concept_id_2; concept_relationship.relationship_id; condition_occurrence.condition_concept_id; condition_occurrence.person_id; person.person_id,12,649,lite_sql,sf_bq354 bq355,cms_data,bigquery,Please tell me the percentage of participants not using quinapril and related medications(Quinapril RxCUI: 35208).,"WITH quinapril_concept AS ( SELECT concept_id FROM `bigquery-public-data.cms_synthetic_patient_data_omop.concept` @@ -8679,7 +8679,7 @@ total_participants AS ( SELECT 100 - (100 * participants_with_quinapril.count / total_participants.count) AS without_quinapril FROM - participants_with_quinapril, total_participants",concept.concept_code; concept.concept_id; concept.vocabulary_id; concept_ancestor.ancestor_concept_id; concept_ancestor.descendant_concept_id; drug_exposure.drug_concept_id; drug_exposure.person_id; person.person_id,8,lite_sql,sf_bq355 + participants_with_quinapril, total_participants",concept.concept_code; concept.concept_id; concept.vocabulary_id; concept_ancestor.ancestor_concept_id; concept_ancestor.descendant_concept_id; drug_exposure.drug_concept_id; drug_exposure.person_id; person.person_id,8,649,lite_sql,sf_bq355 bq357,noaa_data,bigquery,"What are the latitude and longitude coordinates and dates between 2005 and 2015 with the top 5 highest daily average wind speeds, excluding records with missing wind speed values? Using data from tables start with prefix ""icoads_core"".","WITH DailyAverages AS ( SELECT year, month, day, latitude, longitude, @@ -8700,7 +8700,7 @@ FROM WHERE avg_wind_speed IS NOT NULL -ORDER BY avg_wind_speed DESC LIMIT 5",icoads_core_*.day; icoads_core_*.latitude; icoads_core_*.longitude; icoads_core_*.month; icoads_core_*.wind_speed; icoads_core_*.year,6,lite_sql,sf_bq357 +ORDER BY avg_wind_speed DESC LIMIT 5",icoads_core_*.day; icoads_core_*.latitude; icoads_core_*.longitude; icoads_core_*.month; icoads_core_*.wind_speed; icoads_core_*.year,6,739,lite_sql,sf_bq357 sf_bq358,NEW_YORK_CITIBIKE_1,snowflake,"Can you tell me which bike trip in New York City on July 15, 2015, started and ended in ZIP Code areas with the highest average temperature for that day, as recorded by the Central Park weather station '94728'? If there's more than one trip that meets these criteria, I'd like to know about the one that starts in the smallest ZIP Code and ends in the largest ZIP Code.","SELECT ""ZIPSTART"".""zip_code"" AS zip_code_start, ""ZIPEND"".""zip_code"" AS zip_code_end @@ -8726,7 +8726,7 @@ WHERE AND DATE_TRUNC('DAY', TO_TIMESTAMP_NTZ(TO_NUMBER(""TRI"".""starttime"") / 1000000)) = DATE '2015-07-15' ORDER BY ""WEA"".""temp"" DESC, ""ZIPSTART"".""zip_code"" ASC, ""ZIPEND"".""zip_code"" DESC -LIMIT 1;",CITIBIKE_TRIPS.end_station_latitude; CITIBIKE_TRIPS.end_station_longitude; CITIBIKE_TRIPS.start_station_latitude; CITIBIKE_TRIPS.start_station_longitude; CITIBIKE_TRIPS.starttime; ZIP_CODES.zip_code; ZIP_CODES.zip_code_geom,7,lite_sql,sf_bq358 +LIMIT 1;",CITIBIKE_TRIPS.end_station_latitude; CITIBIKE_TRIPS.end_station_longitude; CITIBIKE_TRIPS.start_station_latitude; CITIBIKE_TRIPS.start_station_longitude; CITIBIKE_TRIPS.starttime; ZIP_CODES.zip_code; ZIP_CODES.zip_code_geom,7,245,lite_sql,sf_bq358 sf_bq359,GITHUB_REPOS,snowflake,List the repository names and commit counts for the top two GitHub repositories with JavaScript as the primary language and the highest number of commits.,"WITH repositories AS ( SELECT t2.""repo_name"", @@ -8770,7 +8770,7 @@ GROUP BY sc.""repo_name"" ORDER BY ""num_commits"" DESC -LIMIT 2;",LANGUAGES.language; LANGUAGES.repo_name; SAMPLE_COMMITS.commit; SAMPLE_COMMITS.repo_name,4,snow_sql_near_exact,sf_bq359 +LIMIT 2;",LANGUAGES.language; LANGUAGES.repo_name; SAMPLE_COMMITS.commit; SAMPLE_COMMITS.repo_name,4,34,snow_sql_near_exact,sf_bq359 bq360,nppes,bigquery,"Which of the top 10 most common healthcare provider specializations in Mountain View, CA, has a specialist count closest to the average of these ten specializations?","WITH specialist_counts AS ( SELECT healthcare_provider_taxonomy_1_specialization, @@ -8814,7 +8814,7 @@ FROM closest_to_average ORDER BY difference -LIMIT 1;",npi_optimized.healthcare_provider_taxonomy_1_specialization; npi_optimized.npi; npi_optimized.provider_business_practice_location_address_city_name; npi_optimized.provider_business_practice_location_address_state_name,4,lite_sql,sf_bq360 +LIMIT 1;",npi_optimized.healthcare_provider_taxonomy_1_specialization; npi_optimized.npi; npi_optimized.provider_business_practice_location_address_city_name; npi_optimized.provider_business_practice_location_address_state_name,4,822,lite_sql,sf_bq360 bq362,chicago,bigquery,Which three companies had the largest increase in trip numbers between two consecutive months in 2018?,"select company from (select *, row_number() over(partition by company order by month_o_month_calc desc) as rownum @@ -8835,7 +8835,7 @@ bq362,chicago,bigquery,Which three companies had the largest increase in trip nu ) where rownum = 1 order by month_o_month_calc desc, company - limit 3",taxi_trips.company; taxi_trips.trip_start_timestamp,2,lite_sql,sf_bq362 + limit 3",taxi_trips.company; taxi_trips.trip_start_timestamp,2,45,lite_sql,sf_bq362 bq363,chicago,bigquery,"For taxi trips with a duration rounded to the nearest minute, and between 1 and 50 minutes, if the trip durations are divided into 10 quantiles, what are the total number of trips and the average fare for each quantile?","SELECT FORMAT('%02.0fm to %02.0fm', min_minutes, max_minutes) AS minutes_range, SUM(trips) AS total_trips, @@ -8867,7 +8867,7 @@ FROM ( GROUP BY minutes_range ORDER BY - Minutes_range",taxi_trips.fare; taxi_trips.trip_seconds,2,lite_sql,sf_bq363 + Minutes_range",taxi_trips.fare; taxi_trips.trip_seconds,2,45,lite_sql,sf_bq363 bq366,the_met,bigquery,"What are the top three most frequently associated labels with artworks from each historical period in The Met's collection, only considering labels linked to 50 or more artworks? Provide me with the period, label, and the associated count.","SELECT period, description, c FROM ( SELECT a.period, @@ -8887,7 +8887,7 @@ row_number() over (partition by period order by count(*) desc) seqnum ) WHERE seqnum <= 3 AND c >= 500 # only include labels that have 50 or more pieces associated with it -ORDER BY period, c desc;",objects.object_id; objects.period; vision_api_data.labelAnnotations; vision_api_data.object_id,4,lite_sql,sf_bq366 +ORDER BY period, c desc;",objects.object_id; objects.period; vision_api_data.labelAnnotations; vision_api_data.object_id,4,61,lite_sql,sf_bq366 bq374,ga360,bigquery,"Calculates the percentage of new users who, between August 1, 2016, and April 30, 2017, both stayed on the site for more than 5 minutes during their initial visit and made a purchase on a subsequent visit at any later time, relative to the total number of new users in the same period.","WITH initial_visits AS ( SELECT fullVisitorId, @@ -8952,7 +8952,7 @@ SELECT (final_counts.users_matching_criteria / total_new_users.total_new_users) * 100 AS percentage_matching_criteria FROM final_counts, - total_new_users;",ga_sessions_*.date; ga_sessions_*.fullVisitorId; ga_sessions_*.totals; ga_sessions_*.visitStartTime,4,lite_sql,sf_bq374 + total_new_users;",ga_sessions_*.date; ga_sessions_*.fullVisitorId; ga_sessions_*.totals; ga_sessions_*.visitStartTime,4,16,lite_sql,sf_bq374 bq376,san_francisco_plus,bigquery,"For each neighborhood in San Francisco, list the number of bike share stations and the total number of crime incidents.","WITH station_neighborhoods AS ( SELECT bs.station_id, @@ -8995,7 +8995,7 @@ ON sn.neighborhood = ncc.neighborhood GROUP BY sn.neighborhood ORDER BY - crime_number ASC",boundaries.neighborhood; boundaries.neighborhood_geom; sfpd_incidents.latitude; sfpd_incidents.longitude,4,lite_sql,sf_bq376 + crime_number ASC",boundaries.neighborhood; boundaries.neighborhood_geom; sfpd_incidents.latitude; sfpd_incidents.longitude,4,278,lite_sql,sf_bq376 sf_bq377,GITHUB_REPOS,snowflake,Extract and count the frequency of all package names listed in the require section of JSON-formatted content,"WITH json_files AS ( SELECT c.""id"", @@ -9020,7 +9020,7 @@ WHERE GROUP BY ""package_name"" ORDER BY - ""count"" DESC;",SAMPLE_CONTENTS.content; SAMPLE_CONTENTS.id,2,lite_sql,sf_bq377 + ""count"" DESC;",SAMPLE_CONTENTS.content; SAMPLE_CONTENTS.id,2,34,lite_sql,sf_bq377 bq379,open_targets_platform_1,bigquery,Which target approved symbol has the overall association score closest to the mean score for psoriasis?,"WITH AvgScore AS ( SELECT AVG(associations.score) AS avg_score @@ -9051,7 +9051,7 @@ WHERE diseases.name = 'psoriasis' ORDER BY ABS(associations.score - AvgScore.avg_score) ASC -LIMIT 1",associationByOverallDirect.diseaseId; associationByOverallDirect.score; associationByOverallDirect.targetId; diseases.id; diseases.name; targets.approvedSymbol; targets.id,7,lite_sql,sf_bq379 +LIMIT 1",associationByOverallDirect.diseaseId; associationByOverallDirect.score; associationByOverallDirect.targetId; diseases.id; diseases.name; targets.approvedSymbol; targets.id,7,332,lite_sql,sf_bq379 bq383,ghcn_d,bigquery,"Could you provide the highest recorded precipitation, minimum temperature, and maximum temperature from the last 15 days of each year from 2013 to 2016 at weather station USW00094846? Ensure each value represents the peak measurement for that period, with precipitation in millimeters and temperatures in degrees Celsius, including only valid and high-quality data.","WITH data AS ( SELECT EXTRACT(YEAR FROM wx.date) AS year, @@ -9127,7 +9127,7 @@ SELECT MAX(max_tmax) AS annual_max_tmax FROM data GROUP BY year -ORDER BY year ASC;",ghcnd_*.date; ghcnd_*.element; ghcnd_*.id; ghcnd_*.qflag; ghcnd_*.value,5,lite_sql,sf_bq383 +ORDER BY year ASC;",ghcnd_*.date; ghcnd_*.element; ghcnd_*.id; ghcnd_*.qflag; ghcnd_*.value,5,37,lite_sql,sf_bq383 bq389,epa_historical_air_quality,bigquery,"Please calculate the monthly average levels of PM10, PM2.5 FRM, PM2.5 non-FRM, volatile organic emissions, SO2 (scaled by a factor of 10), and Lead (scaled by a factor of 100) air pollutants in California for the year 2020.","SELECT pm10.month AS month, pm10.avg AS pm10, @@ -9184,7 +9184,7 @@ JOIN GROUP BY year, month) AS so2 ON pm10.year = so2.year AND pm10.month = so2.month ORDER BY - month;",lead_daily_summary.arithmetic_mean; lead_daily_summary.date_local; lead_daily_summary.state_name; pm10_daily_summary.arithmetic_mean; pm10_daily_summary.date_local; pm10_daily_summary.state_name; pm_*.arithmetic_mean; pm_*.date_local; pm_*.state_name; so2_daily_summary.arithmetic_mean; so2_daily_summary.date_local; so2_daily_summary.state_name; voc_daily_summary.arithmetic_mean; voc_daily_summary.date_local; voc_daily_summary.state_name,15,lite_sql,sf_bq389 + month;",lead_daily_summary.arithmetic_mean; lead_daily_summary.date_local; lead_daily_summary.state_name; pm10_daily_summary.arithmetic_mean; pm10_daily_summary.date_local; pm10_daily_summary.state_name; pm_*.arithmetic_mean; pm_*.date_local; pm_*.state_name; so2_daily_summary.arithmetic_mean; so2_daily_summary.date_local; so2_daily_summary.state_name; voc_daily_summary.arithmetic_mean; voc_daily_summary.date_local; voc_daily_summary.state_name,15,879,lite_sql,sf_bq389 sf_bq390,IDC,snowflake,"Please provide the study instance UIDs for studies that include both T2-weighted axial magnetic resonance imaging and anatomical structure segmentations of the peripheral zone, in prostate repeatability collection.","WITH -- Studies that have MR volumes ""mr_studies"" AS ( @@ -9220,7 +9220,7 @@ FROM JOIN ""seg_studies"" ON - ""mr_studies"".""StudyInstanceUID"" = ""seg_studies"".""StudyInstanceUID"";",DICOM_ALL.Modality; DICOM_ALL.SOPInstanceUID; DICOM_ALL.StudyInstanceUID; SEGMENTATIONS.SOPInstanceUID,4,lite_sql,sf_bq390 + ""mr_studies"".""StudyInstanceUID"" = ""seg_studies"".""StudyInstanceUID"";",DICOM_ALL.Modality; DICOM_ALL.SOPInstanceUID; DICOM_ALL.StudyInstanceUID; SEGMENTATIONS.SOPInstanceUID,4,2100,lite_sql,sf_bq390 bq392,noaa_gsod,bigquery,"What are the top 3 dates in October 2009 with the highest average temperature for station number 723758, in the format YYYY-MM-DD?","WITH # FIRST CAST EACH YEAR, MONTH, DATE TO STRINGS T AS ( @@ -9273,7 +9273,7 @@ FROM Temp_Avg ORDER BY avg_temp DESC -LIMIT 3;",gsod_*.da; gsod_*.mo; gsod_*.stn; gsod_*.temp; gsod_*.year,5,lite_sql,sf_bq392 +LIMIT 3;",gsod_*.da; gsod_*.mo; gsod_*.stn; gsod_*.temp; gsod_*.year,5,44,lite_sql,sf_bq392 bq394,noaa_data,bigquery,"What are the top 3 months between 2010 and 2014 with the smallest sum of absolute differences between the average air temperature, wet bulb temperature, dew point temperature, and sea surface temperature, including respective years and sum of differences? Please present the year and month in numerical format.","WITH DailyAverages AS ( SELECT year, month, day, @@ -9328,7 +9328,7 @@ FROM DifferenceSums ORDER BY sum_of_differences ASC -LIMIT 3;",icoads_core_*.air_temperature; icoads_core_*.day; icoads_core_*.dewpoint_temperature; icoads_core_*.month; icoads_core_*.sea_surface_temp; icoads_core_*.wetbulb_temperature; icoads_core_*.year,7,lite_sql,sf_bq394 +LIMIT 3;",icoads_core_*.air_temperature; icoads_core_*.day; icoads_core_*.dewpoint_temperature; icoads_core_*.month; icoads_core_*.sea_surface_temp; icoads_core_*.wetbulb_temperature; icoads_core_*.year,7,739,lite_sql,sf_bq394 bq395,sdoh,bigquery,Which 5 states' percentage change in unsheltered homeless individuals from 2015 to 2018 were top 5 closest to the national average? Please provide the state abbreviation.,"WITH homeless_2015 AS ( SELECT Unsheltered_Homeless AS U15, SUBSTR(CoC_Number, 0, 2) as State_Abbr FROM `bigquery-public-data.sdoh_hud_pit_homelessness.hud_pit_by_coc` @@ -9364,7 +9364,7 @@ closest_to_avg AS ( LIMIT 5 ) -SELECT State_Abbr FROM closest_to_avg;",hud_pit_by_coc.CoC_Number; hud_pit_by_coc.Count_Year; hud_pit_by_coc.Unsheltered_Homeless,3,lite_sql,sf_bq395 +SELECT State_Abbr FROM closest_to_avg;",hud_pit_by_coc.CoC_Number; hud_pit_by_coc.Count_Year; hud_pit_by_coc.Unsheltered_Homeless,3,4068,lite_sql,sf_bq395 bq396,nhtsa_traffic_fatalities,bigquery,Which top 3 states had the largest differences in the number of traffic accidents between rainy and clear weather during weekends in 2016? Please also provide the respective differences for each state.,"WITH weekend_accidents AS ( SELECT state_name, @@ -9403,7 +9403,7 @@ FROM weather_difference ORDER BY Difference DESC -LIMIT 3;",accident_*.atmospheric_conditions_1_name; accident_*.consecutive_number; accident_*.state_name; accident_*.timestamp_of_crash,4,lite_sql,sf_bq396 +LIMIT 3;",accident_*.atmospheric_conditions_1_name; accident_*.consecutive_number; accident_*.state_name; accident_*.timestamp_of_crash,4,687,lite_sql,sf_bq396 bq397,ecommerce,bigquery,"Identify the country with the highest total transactions within each channel grouping, provided that the channel includes transactions from more than one country. What is the transaction total for that country?","WITH tmp AS ( SELECT DISTINCT * FROM `data-to-insights.ecommerce.rev_transactions` @@ -9440,7 +9440,7 @@ SELECT Country, TotalTransaction FROM tmp3 -WHERE rnk = 1;",rev_transactions.channelGrouping; rev_transactions.geoNetwork_country; rev_transactions.totals_transactions,3,lite_sql,sf_bq397 +WHERE rnk = 1;",rev_transactions.channelGrouping; rev_transactions.geoNetwork_country; rev_transactions.totals_transactions,3,154,lite_sql,sf_bq397 bq398,world_bank,bigquery,What are the top three debt indicators for Russia based on the highest debt values?,"WITH russia_Data as ( SELECT distinct id.country_name, @@ -9474,7 +9474,7 @@ ORDER BY SELECT indicator_name FROM russia_data -LIMIT 3;",country_summary.country_code; country_summary.region; international_*.country_code; international_*.country_name; international_*.indicator_name; international_*.value,6,lite_sql,sf_bq398 +LIMIT 3;",country_summary.country_code; country_summary.region; international_*.country_code; international_*.country_name; international_*.indicator_name; international_*.value,6,152,lite_sql,sf_bq398 bq399,world_bank,bigquery,"Which high-income country had the highest average crude birth rate respectively in each region, and what are their corresponding average birth rate, during the 1980s?","WITH country_data AS ( SELECT country_code, @@ -9523,7 +9523,7 @@ FROM WHERE rank = 1 ORDER BY - region;",country_summary.country_code; country_summary.income_group; country_summary.region; country_summary.short_name; indicators_data.country_code; indicators_data.indicator_code; indicators_data.value; indicators_data.year,8,lite_sql,sf_bq399 + region;",country_summary.country_code; country_summary.income_group; country_summary.region; country_summary.short_name; indicators_data.country_code; indicators_data.indicator_code; indicators_data.value; indicators_data.year,8,152,lite_sql,sf_bq399 bq400,san_francisco_plus,bigquery,"What are the start and end times of trips from 'Clay St & Drumm St' to 'Sacramento St & Davis St' (one direction only), in the format of HH:MM:SS? I also want the trip headsign for each route.","WITH SelectedStops AS ( SELECT stop_id, @@ -9557,7 +9557,7 @@ JOIN FilteredStopTimes st2 ON t.trip_id = CAST(st2.trip_id AS STRING) AND st2.st WHERE st1.stop_sequence < st2.stop_sequence GROUP BY - t.trip_headsign;",stop_times.arrival_time; stop_times.departure_time; stop_times.stop_id; stop_times.stop_sequence; stop_times.trip_id; stops.stop_id; stops.stop_name; trips.trip_headsign; trips.trip_id,9,lite_sql,sf_bq400 + t.trip_headsign;",stop_times.arrival_time; stop_times.departure_time; stop_times.stop_id; stop_times.stop_sequence; stop_times.trip_id; stops.stop_id; stops.stop_name; trips.trip_headsign; trips.trip_id,9,278,lite_sql,sf_bq400 bq402,ecommerce,bigquery,"What is the conversion rate from unique visitors to purchasers, where purchasers are defined as visitors with at least one transaction? Additionally, what is the average number of transactions per purchaser?","WITH visitors AS ( SELECT COUNT(DISTINCT fullVisitorId) AS total_visitors @@ -9590,7 +9590,7 @@ SELECT FROM visitors v, purchasers p, - transactions a;",web_analytics.fullVisitorId; web_analytics.totals,2,lite_sql,sf_bq402 + transactions a;",web_analytics.fullVisitorId; web_analytics.totals,2,154,lite_sql,sf_bq402 bq403,irs_990,bigquery,Which three years in 2012-2017 have the smallest absolute difference between median revenue and median functional expenses for organizations filing IRS 990 forms? Please output three years and respective differences.,"WITH RankedData AS ( SELECT CONCAT(""20"", _TABLE_SUFFIX) AS year_filed, @@ -9641,7 +9641,7 @@ WHERE year_filed BETWEEN '2012' AND '2017' ORDER BY difference ASC -LIMIT 3;",irs_990_*.totfuncexpns; irs_990_*.totrevenue,2,lite_sql,sf_bq403 +LIMIT 3;",irs_990_*.totfuncexpns; irs_990_*.totrevenue,2,532,lite_sql,sf_bq403 bq406,google_dei,bigquery,"Please calculate the growth rates for Asians, Black people, Latinx people, Native Americans, White people, US women, US men, global women, and global men from 2014 to 2024 concerning the overall workforce.","CREATE TEMP FUNCTION GrowthRate(end_value FLOAT64, begin_value FLOAT64) RETURNS FLOAT64 AS ((end_value - begin_value) / begin_value); @@ -9667,7 +9667,7 @@ SELECT SUM(IF(report_year=2014, gender_global_men, 0))) AS gender_global_men_growth FROM `bigquery-public-data.google_dei.dar_non_intersectional_representation` WHERE report_year IN (2014, 2024) - AND workforce = 'overall';",dar_non_intersectional_*.gender_global_men; dar_non_intersectional_*.gender_global_women; dar_non_intersectional_*.gender_us_men; dar_non_intersectional_*.gender_us_women; dar_non_intersectional_*.race_asian; dar_non_intersectional_*.race_black; dar_non_intersectional_*.race_hispanic_latinx; dar_non_intersectional_*.race_native_american; dar_non_intersectional_*.race_white; dar_non_intersectional_*.report_year; dar_non_intersectional_*.workforce,11,lite_sql,sf_bq406 + AND workforce = 'overall';",dar_non_intersectional_*.gender_global_men; dar_non_intersectional_*.gender_global_women; dar_non_intersectional_*.gender_us_men; dar_non_intersectional_*.gender_us_women; dar_non_intersectional_*.race_asian; dar_non_intersectional_*.race_black; dar_non_intersectional_*.race_hispanic_latinx; dar_non_intersectional_*.race_native_american; dar_non_intersectional_*.race_white; dar_non_intersectional_*.report_year; dar_non_intersectional_*.workforce,11,436,lite_sql,sf_bq406 bq407,covid19_usa,bigquery,"Find the top three counties with populations over 50,000, using the 2020 5-year census data, that had the highest COVID-19 case fatality rates on August 27, 2020. For these counties, provide the name, state, median age, total population, number of confirmed COVID-19 cases per 100,000 people, number of deaths per 100,000 people, and the case fatality rate as a percentage","WITH population_data AS ( SELECT geo_id, @@ -9706,7 +9706,7 @@ JOIN population_data pop ON covid.county_fips_code = pop.geo_id ORDER BY case_fatality_rate DESC -LIMIT 3;",county_*.geo_id; county_*.median_age; county_*.total_pop; summary.confirmed_cases; summary.county_fips_code; summary.county_name; summary.date; summary.deaths; summary.state,9,lite_sql,sf_bq407 +LIMIT 3;",county_*.geo_id; county_*.median_age; county_*.total_pop; summary.confirmed_cases; summary.county_fips_code; summary.county_name; summary.date; summary.deaths; summary.state,9,6066,lite_sql,sf_bq407 sf_bq412,GOOGLE_ADS,snowflake,"Please provide the page URLs, first shown time, last shown time, removal reason, violation category, and lower and upper bound shown times for the most recent five closed ads in the Croatia region which had shown higher than 10,000 and lower than 25,000, and used at least one audience criterion such as demographics, geographic location, contextual signals, customer lists, or interest topics. The region code of Croatia is HR.","SELECT ""creative_page_url"", TO_TIMESTAMP(GET(""region_stat"".value, 'first_shown')) AS ""first_shown"", @@ -9732,7 +9732,7 @@ WHERE ) ORDER BY ""last_shown"" DESC -LIMIT 5;",REMOVED_CREATIVE_STATS.audience_selection_approach_info; REMOVED_CREATIVE_STATS.creative_page_url; REMOVED_CREATIVE_STATS.disapproval; REMOVED_CREATIVE_STATS.region_stats,4,snow_sql_near_exact,sf_bq412 +LIMIT 5;",REMOVED_CREATIVE_STATS.audience_selection_approach_info; REMOVED_CREATIVE_STATS.creative_page_url; REMOVED_CREATIVE_STATS.disapproval; REMOVED_CREATIVE_STATS.region_stats,4,16,snow_sql_near_exact,sf_bq412 bq413,dimensions_ai_covid19,bigquery,"Retrieve the venue titles of publications inserted from 2024 onwards, where the associated grid's city is 'Qianjiang', prioritizing the venue titles from journal first, then proceedings, book, or book series titles.","SELECT COALESCE(p.journal.title, p.proceedings_title.preferred, p.book_title.preferred, p.book_series_title.preferred) AS venue, FROM @@ -9746,7 +9746,7 @@ ON WHERE EXTRACT(YEAR FROM date_inserted) >= 2021 AND - grid.address.city = 'Qianjiang'",grid.address; grid.id; publications.book_series_title; publications.book_title; publications.date_inserted; publications.journal; publications.proceedings_title; publications.research_orgs,8,lite_sql,sf_bq413 + grid.address.city = 'Qianjiang'",grid.address; grid.id; publications.book_series_title; publications.book_title; publications.date_inserted; publications.journal; publications.proceedings_title; publications.research_orgs,8,282,lite_sql,sf_bq413 bq414,the_met,bigquery,"Retrieve the object id, title, and the formatted metadata date (as a string in 'YYYY-MM-DD' format) for objects in the ""The Libraries"" department where the cropConfidence is greater than 0.5, the object's title contains the word ""book"".","SELECT a.object_id, a.title, @@ -9761,7 +9761,7 @@ JOIN ( ON a.object_id = b.object_id WHERE a.department = ""The Libraries"" AND b.cropConfidence > 0.5 -AND a.title LIKE ""%book%""",objects.department; objects.metadata_date; objects.object_id; objects.title; vision_api_data.cropHintsAnnotation; vision_api_data.object_id,6,lite_sql,sf_bq414 +AND a.title LIKE ""%book%""",objects.department; objects.metadata_date; objects.object_id; objects.title; vision_api_data.cropHintsAnnotation; vision_api_data.object_id,6,61,lite_sql,sf_bq414 bq419,noaa_data,bigquery,"Which 5 states had the most storm events from 1980 to 1995, considering only the top 1000 states with the highest event counts each year? Please use state abbreviations.","WITH s80 as (SELECT state, COUNT(event_id) as num_events FROM `bigquery-public-data.noaa_historic_severe_storms.storms_1980` @@ -9890,7 +9890,7 @@ FULL JOIN s94 ON s94.state = s81.state FULL JOIN s95 ON s95.state = s81.state ORDER BY total_events DESC -LIMIT 5;",storms_*.event_id; storms_*.state,2,lite_sql,sf_bq419 +LIMIT 5;",storms_*.event_id; storms_*.state,2,739,lite_sql,sf_bq419 sf_bq421,IDC,snowflake,"Can you list all unique pairs of embedding medium and staining substance code meanings, along with the number of occurrences for each pair, based on distinct embedding medium and staining substance codes from the 'SM' modality in the DICOM dataset's un-nested specimen preparation sequences, ensuring that the codes are from the SCT coding scheme?","WITH SpecimenPreparationSequence_unnested AS ( SELECT @@ -9956,7 +9956,7 @@ FROM , LATERAL FLATTEN(input => embedding_data.""staining_usingSubstance_code_str"") AS staining_usingSubstance_CodeMeaning_flat GROUP BY SPLIT_PART(embeddingMedium_CodeMeaning_flat.VALUE::STRING, ':', 1), - SPLIT_PART(staining_usingSubstance_CodeMeaning_flat.VALUE::STRING, ':', 1);",DICOM_ALL.Modality; DICOM_ALL.SOPInstanceUID; DICOM_ALL.SpecimenDescriptionSequence,3,snow_sql_near_exact,sf_bq421 + SPLIT_PART(staining_usingSubstance_CodeMeaning_flat.VALUE::STRING, ':', 1);",DICOM_ALL.Modality; DICOM_ALL.SOPInstanceUID; DICOM_ALL.SpecimenDescriptionSequence,3,2100,snow_sql_near_exact,sf_bq421 sf_bq422,IDC,snowflake,"What are the average series sizes in MiB for the top 3 patients with the highest slice interval difference tolerance and the top 3 patients with the highest maximum exposure difference, considering only CT images from the 'nlst' collection?","WITH nonLocalizerRawData AS ( SELECT @@ -10043,7 +10043,7 @@ SELECT 'Top 3 by Max Exposure' AS ""MetricGroup"", AVG(""seriesSizeInMB"") AS ""AverageSeriesSizeInMB"" FROM - top3ByMaxExposure;",DICOM_ALL.Exposure; DICOM_ALL.ImagePositionPatient; DICOM_ALL.PatientID; DICOM_ALL.SeriesInstanceUID; DICOM_ALL.StudyInstanceUID; DICOM_ALL.collection_id; DICOM_ALL.instance_size,7,lite_sql,sf_bq422 + top3ByMaxExposure;",DICOM_ALL.Exposure; DICOM_ALL.ImagePositionPatient; DICOM_ALL.PatientID; DICOM_ALL.SeriesInstanceUID; DICOM_ALL.StudyInstanceUID; DICOM_ALL.collection_id; DICOM_ALL.instance_size,7,2100,lite_sql,sf_bq422 bq424,world_bank,bigquery,"List the top 10 countries with respect to the total amount of long-term external debt in descending order, excluding those without a specified region.","SELECT DISTINCT id.country_name, --cs.region, @@ -10072,7 +10072,7 @@ ON cs.country_code = id.country_code ORDER BY id.value DESC - LIMIT 10",country_summary.country_code; country_summary.region; international_*.country_code; international_*.country_name; international_*.indicator_code; international_*.value,6,lite_sql,sf_bq424 + LIMIT 10",country_summary.country_code; country_summary.region; international_*.country_code; international_*.country_name; international_*.indicator_code; international_*.value,6,152,lite_sql,sf_bq424 bq425,ebi_chembl,bigquery,"List all distinct molecules associated with the company 'SanofiAventis,' along with their trade name and approval date, retaining the most recent approval date for each molecule, using data from ChEMBL Release 23.","SELECT * FROM ( SELECT @@ -10087,7 +10087,7 @@ bq425,ebi_chembl,bigquery,"List all distinct molecules associated with the compa JOIN bigquery-public-data.ebi_chembl.formulations_23 AS form USING (molregno) JOIN bigquery-public-data.ebi_chembl.products_23 AS prod USING (product_id) ) as subq - WHERE rn = 1 AND company = 'SanofiAventis'",compound_records_23.molregno; formulations_*.molregno; formulations_*.product_id; molecule_synonyms_*.molregno; molecule_synonyms_*.res_stem_id; products_*.approval_date; products_*.product_id; products_*.trade_name; research_companies_*.company; research_companies_*.res_stem_id,10,lite_sql,sf_bq425 + WHERE rn = 1 AND company = 'SanofiAventis'",compound_records_23.molregno; formulations_*.molregno; formulations_*.product_id; molecule_synonyms_*.molregno; molecule_synonyms_*.res_stem_id; products_*.approval_date; products_*.product_id; products_*.trade_name; research_companies_*.company; research_companies_*.res_stem_id,10,1137,lite_sql,sf_bq425 bq428,ncaa_basketball,bigquery,"For the top five team markets with the highest number of distinct players who scored at least 15 points during the second period of games between 2010 and 2018, provide details of each game they played in NCAA basketball historical tournament matches during the same period, as specified in the data model document.","WITH top_teams AS ( SELECT team_market @@ -10158,7 +10158,7 @@ SELECT win_school_ncaa AS opponent_school_ncaa FROM `bigquery-public-data.ncaa_basketball.mbb_historical_tournament_games` JOIN top_teams ON top_teams.team_market = lose_market -WHERE season >= 2010 AND season <=2018",mbb_historical_tournament_games.day; mbb_historical_tournament_games.days_from_epoch; mbb_historical_tournament_games.game_date; mbb_historical_tournament_games.lose_alias; mbb_historical_tournament_games.lose_market; mbb_historical_tournament_games.lose_name; mbb_historical_tournament_games.lose_school_ncaa; mbb_historical_tournament_games.lose_seed; mbb_historical_tournament_games.round; mbb_historical_tournament_games.season; mbb_historical_tournament_games.win_alias; mbb_historical_tournament_games.win_market; mbb_historical_tournament_games.win_name; mbb_historical_tournament_games.win_school_ncaa; mbb_historical_tournament_games.win_seed; mbb_pbp_sr.game_id; mbb_pbp_sr.period; mbb_pbp_sr.player_id; mbb_pbp_sr.points_scored; mbb_pbp_sr.season; mbb_pbp_sr.team_market,21,lite_sql,sf_bq428 +WHERE season >= 2010 AND season <=2018",mbb_historical_tournament_games.day; mbb_historical_tournament_games.days_from_epoch; mbb_historical_tournament_games.game_date; mbb_historical_tournament_games.lose_alias; mbb_historical_tournament_games.lose_market; mbb_historical_tournament_games.lose_name; mbb_historical_tournament_games.lose_school_ncaa; mbb_historical_tournament_games.lose_seed; mbb_historical_tournament_games.round; mbb_historical_tournament_games.season; mbb_historical_tournament_games.win_alias; mbb_historical_tournament_games.win_market; mbb_historical_tournament_games.win_name; mbb_historical_tournament_games.win_school_ncaa; mbb_historical_tournament_games.win_seed; mbb_pbp_sr.game_id; mbb_pbp_sr.period; mbb_pbp_sr.player_id; mbb_pbp_sr.points_scored; mbb_pbp_sr.season; mbb_pbp_sr.team_market,21,505,lite_sql,sf_bq428 sf_bq429,CENSUS_BUREAU_ACS_2,snowflake,"What are the top 5 states with the highest average median income difference from 2015 to 2018? also provide the average number of vulnerable employees across various industries for these states, using data from the ACS 5-Year Estimates for 2017.","WITH median_income_diff_by_zipcode AS ( WITH acs_2018 AS ( SELECT @@ -10220,7 +10220,7 @@ FROM base_census ORDER BY ""avg_median_income_diff"" DESC -LIMIT 5;",ZIP_CODES.state_name; ZIP_CODES.zip_code,2,lite_sql,sf_bq429 +LIMIT 5;",ZIP_CODES.state_name; ZIP_CODES.zip_code,2,3625,lite_sql,sf_bq429 bq430,ebi_chembl,bigquery,"Find pairs of different molecules tested in the same assay and standard type, where both have 10–15 heavy atoms, fewer than 5 activities in that assay, fewer than 2 duplicate activities, non-null standard values, and pChEMBL values over 10. For each pair, report the maximum heavy atom count, the latest publication date (calculated based on the document's rank within the same journal and year, and map it to a synthetic month and day), the highest document ID, classify the change in standard values as 'increase', 'decrease', or 'no-change' based on their values and relations, and generate UUIDs from their activity IDs and canonical SMILES.","select -- *, greatest(heavy_atoms_1, heavy_atoms_2) as heavy_atoms_greatest, @@ -10309,7 +10309,7 @@ where a1.duplicate_activities_1 < 2 and a2.duplicate_activities_2 < 2 and a1.pchembl_value_1 > 10 and - a2.pchembl_value_2 > 10",activities_*.activity_id; activities_*.assay_id; activities_*.doc_id; activities_*.molregno; activities_*.pchembl_value; activities_*.standard_relation; activities_*.standard_type; activities_*.standard_value; compound_properties_*.heavy_atoms; compound_properties_*.molregno; compound_structures_*.canonical_smiles; compound_structures_*.molregno; docs_*.doc_id; docs_*.first_page; docs_*.journal; docs_*.year,16,lite_sql,sf_bq430 + a2.pchembl_value_2 > 10",activities_*.activity_id; activities_*.assay_id; activities_*.doc_id; activities_*.molregno; activities_*.pchembl_value; activities_*.standard_relation; activities_*.standard_type; activities_*.standard_value; compound_properties_*.heavy_atoms; compound_properties_*.molregno; compound_structures_*.canonical_smiles; compound_structures_*.molregno; docs_*.doc_id; docs_*.first_page; docs_*.journal; docs_*.year,16,1137,lite_sql,sf_bq430 bq442,CYMBAL_INVESTMENTS,bigquery,Please collect the information of the top 6 trade report with the highest closing prices. Refer to the document for all the information I want.,"SELECT OrderID AS tradeID, MaturityDate AS tradeTimestamp, @@ -10341,7 +10341,7 @@ bq442,CYMBAL_INVESTMENTS,bigquery,Please collect the information of the top 6 tr FROM `bigquery-public-data.cymbal_investments.trade_capture_report`cv ORDER BY closePrice DESC -LIMIT 6",trade_capture_report.LastPx; trade_capture_report.MaturityDate; trade_capture_report.OrderID; trade_capture_report.Sides; trade_capture_report.StrikePrice; trade_capture_report.Symbol; trade_capture_report.TargetCompID,7,lite_sql,sf_bq442 +LIMIT 6",trade_capture_report.LastPx; trade_capture_report.MaturityDate; trade_capture_report.OrderID; trade_capture_report.Sides; trade_capture_report.StrikePrice; trade_capture_report.Symbol; trade_capture_report.TargetCompID,7,14,lite_sql,sf_bq442 sf_bq444,CRYPTO,snowflake,"Can you pull the blockchain timestamp, block number, and transaction hash for the first five mint and burn events from Ethereum logs for the address '0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8'? Please include mint events identified by the topic '0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde' and burn events by '0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c', and order them by block timestamp from the oldest to the newest.","WITH parsed_burn_logs AS ( SELECT logs.""block_timestamp"" AS block_timestamp, @@ -10382,7 +10382,7 @@ SELECT FROM parsed_burn_logs ORDER BY block_timestamp -LIMIT 5;",LOGS.address; LOGS.block_number; LOGS.block_timestamp; LOGS.data; LOGS.log_index; LOGS.topics; LOGS.transaction_hash,7,lite_sql,sf_bq444 +LIMIT 5;",LOGS.address; LOGS.block_number; LOGS.block_timestamp; LOGS.data; LOGS.log_index; LOGS.topics; LOGS.transaction_hash,7,286,lite_sql,sf_bq444 bq452,_1000_genomes,bigquery,"Identify variants on chromosome 12, calculate their chi-squared scores using allele counts in cases and controls, and return the start, end, chi-squared score (after Yates's correction for continuity) of top variants where the chi-squared score is no less than 29.71679, ensuring that each group has expected counts of at least 5 for the chi-squared calculation.","SELECT * FROM ( SELECT @@ -10450,7 +10450,7 @@ FROM ( WHERE chi_squared_score >= 29.71679 ORDER BY - chi_squared_score DESC",sample_info.Sample; sample_info.Super_Population; variants.VT; variants.alternate_bases; variants.call; variants.end; variants.reference_bases; variants.reference_name; variants.start,9,lite_sql,sf_bq452 + chi_squared_score DESC",sample_info.Sample; sample_info.Super_Population; variants.VT; variants.alternate_bases; variants.call; variants.end; variants.reference_bases; variants.reference_name; variants.start,9,114,lite_sql,sf_bq452 bq453,_1000_genomes,bigquery,"What are the reference names, start positions, end positions, reference bases, alternate bases, variant types, chi-squared scores (calculated using Hardy-Weinberg equilibrium), and the observed and expected counts of homozygous reference, heterozygous, and homozygous alternate genotypes, including their allele frequencies and allele frequencies, for variants on chromosome 17 between positions 41196311 and 41277499?","SELECT reference_name, start, @@ -10535,7 +10535,7 @@ FROM ( vt, af ) -)",variants.AF; variants.VT; variants.alternate_bases; variants.call; variants.end; variants.reference_bases; variants.reference_name; variants.start,8,lite_sql,sf_bq453 +)",variants.AF; variants.VT; variants.alternate_bases; variants.call; variants.end; variants.reference_bases; variants.reference_name; variants.start,8,114,lite_sql,sf_bq453 sf_bq455,IDC,snowflake,"Find the top 5 CT scan series ID, including their series number, patient ID, and series size (in MiB), where the series are not classified as 'LOCALIZER' or have the specific JPEG compressed transfer syntaxes '1.2.840.10008.1.2.4.70' or '1.2.840.10008.1.2.4.51'. The series must have consistent slice intervals, exposure levels, image orientation, pixel spacing, image positions, and pixel dimensions. Additionally, the z-axis of the image orientation must align with the expected plane (dot product between 0.99 and 1.01).","WITH -- Create a common table expression (CTE) named localizerAndJpegCompressedSeries localizerAndJpegCompressedSeries AS ( @@ -10715,7 +10715,7 @@ FROM geometryChecks ORDER BY geometryChecks.""seriesSizeInMiB"" DESC -LIMIT 5;",DICOM_ALL.Columns; DICOM_ALL.ImageOrientationPatient; DICOM_ALL.ImagePositionPatient; DICOM_ALL.ImageType; DICOM_ALL.Modality; DICOM_ALL.SOPInstanceUID; DICOM_ALL.SeriesInstanceUID; DICOM_ALL.SeriesNumber; DICOM_ALL.SliceThickness; DICOM_ALL.TransferSyntaxUID; DICOM_ALL.crdc_series_uuid; DICOM_ALL.instance_size,12,lite_sql,sf_bq455 +LIMIT 5;",DICOM_ALL.Columns; DICOM_ALL.ImageOrientationPatient; DICOM_ALL.ImagePositionPatient; DICOM_ALL.ImageType; DICOM_ALL.Modality; DICOM_ALL.SOPInstanceUID; DICOM_ALL.SeriesInstanceUID; DICOM_ALL.SeriesNumber; DICOM_ALL.SliceThickness; DICOM_ALL.TransferSyntaxUID; DICOM_ALL.crdc_series_uuid; DICOM_ALL.instance_size,12,2100,lite_sql,sf_bq455 ga001,ga4,bigquery,I want to know the preferences of customers who purchased the Google Navy Speckled Tee in December 2020. What other product was purchased with the highest total quantity alongside this item?,"WITH Params AS ( SELECT 'Google Navy Speckled Tee' AS selected_product @@ -10752,7 +10752,7 @@ WHERE AND items.item_name != selected_product GROUP BY 1 ORDER BY item_quantity DESC -LIMIT 1;",events_*.event_name; events_*.items; events_*.user_pseudo_id,3,lite_sql,sf_ga001 +LIMIT 1;",events_*.event_name; events_*.items; events_*.user_pseudo_id,3,23,lite_sql,sf_ga001 ga002,ga4,bigquery,Tell me the most purchased other products and their quantities by customers who bought the Google Red Speckled Tee each month for the three months starting from November 2020.,"WITH Params AS ( SELECT 'Google Red Speckled Tee' AS selected_product @@ -10825,7 +10825,7 @@ SELECT FROM TopProductPerPeriod ORDER BY - period;",events_*.event_name; events_*.items; events_*.user_pseudo_id,3,lite_sql,sf_ga002 + period;",events_*.event_name; events_*.items; events_*.user_pseudo_id,3,23,lite_sql,sf_ga002 ga003,firebase,bigquery,"I'm trying to evaluate which board types were most effective on September 15, 2018. Can you find out the average scores for each board type from the quick play mode completions on that day?","WITH EventData AS ( SELECT user_pseudo_id, @@ -10856,7 +10856,7 @@ SELECT FROM ProcessedData GROUP BY - board_type",events_*.event_name; events_*.event_params; events_*.event_timestamp; events_*.user_pseudo_id,4,lite_sql,sf_ga003 + board_type",events_*.event_name; events_*.event_params; events_*.event_timestamp; events_*.user_pseudo_id,4,20,lite_sql,sf_ga003 ga004,ga4,bigquery,Can you figure out the average difference in pageviews between users who bought something and those who didn’t in December 2020? Just label anyone who was involved in purchase events as a purchaser.,"WITH UserInfo AS ( SELECT @@ -10880,7 +10880,7 @@ ga004,ga4,bigquery,Can you figure out the average difference in pageviews betwee SELECT MAX(CASE WHEN purchaser THEN avg_page_views ELSE 0 END) - MAX(CASE WHEN NOT purchaser THEN avg_page_views ELSE 0 END) AS avg_page_views_difference -FROM Averages;",events_*.event_name; events_*.user_pseudo_id,2,lite_sql,sf_ga004 +FROM Averages;",events_*.event_name; events_*.user_pseudo_id,2,23,lite_sql,sf_ga004 ga008,ga4,bigquery,Can you give me the average page views per buyer and total page views among those buyers for each day in November 2020?,"WITH UserInfo AS ( SELECT @@ -10899,7 +10899,7 @@ SELECT FROM UserInfo WHERE purchase_event_count > 0 GROUP BY event_date -ORDER BY event_date;",events_*.event_date; events_*.event_name; events_*.user_pseudo_id,3,lite_sql,sf_ga008 +ORDER BY event_date;",events_*.event_date; events_*.event_name; events_*.user_pseudo_id,3,23,lite_sql,sf_ga008 ga010,ga4,bigquery,Can you give me an overview of our website traffic for December 2020? I'm particularly interested in the channel with the fourth highest number of sessions.,"WITH prep AS ( SELECT user_pseudo_id, @@ -10957,7 +10957,7 @@ GROUP BY channel_grouping_session ORDER BY COUNT(DISTINCT CONCAT(user_pseudo_id, session_id)) DESC -LIMIT 1 OFFSET 3",events_*.event_params; events_*.event_timestamp; events_*.user_pseudo_id,3,lite_sql,sf_ga010 +LIMIT 1 OFFSET 3",events_*.event_params; events_*.event_timestamp; events_*.user_pseudo_id,3,23,lite_sql,sf_ga010 ga012,ga4,bigquery,"Find the transaction IDs, total item quantities, and purchase revenues for the item category with the highest tax rate on November 30, 2020, where the tax and revenue data come from ecommerce.","WITH top_category AS ( SELECT product.item_category, @@ -10987,7 +10987,7 @@ ON product.item_category = top_category.item_category WHERE event_name = 'purchase' GROUP BY - ecommerce.transaction_id;",events_*.ecommerce; events_*.event_name; events_*.items,3,lite_sql,sf_ga012 + ecommerce.transaction_id;",events_*.ecommerce; events_*.event_name; events_*.items,3,23,lite_sql,sf_ga012 ga017,ga4,bigquery,How many distinct users viewed the most frequently visited page during January 2021?,"WITH unnested_events AS ( SELECT MAX(CASE WHEN event_params.key = 'page_location' THEN event_params.value.string_value END) AS page_location, @@ -11015,7 +11015,7 @@ temp AS ( SELECT users FROM temp -LIMIT 1",events_*.event_name; events_*.event_params; events_*.event_timestamp; events_*.user_pseudo_id,4,lite_sql,sf_ga017 +LIMIT 1",events_*.event_name; events_*.event_params; events_*.event_timestamp; events_*.user_pseudo_id,4,23,lite_sql,sf_ga017 ga018,ga4,bigquery,"I'd like to analyze the appeal of our products to users. Can you calculate the percentage of times users go from browsing the product list pages to clicking into the product detail pages during a single session on January 2nd, 2021?","WITH base_table AS ( SELECT event_name, @@ -11135,7 +11135,7 @@ ga018,ga4,bigquery,"I'd like to analyze the appeal of our products to users. Can SELECT (total_transitions * 100.0) / total_plp_views AS percentage FROM - TotalTransitions, TotalPLPViews;",events_*.event_date; events_*.event_name; events_*.event_params; events_*.event_timestamp; events_*.user_pseudo_id,5,lite_sql,sf_ga018 + TotalTransitions, TotalPLPViews;",events_*.event_date; events_*.event_name; events_*.event_params; events_*.event_timestamp; events_*.user_pseudo_id,5,23,lite_sql,sf_ga018 ga019,firebase,bigquery,Could you determine what percentage of users either did not uninstall our app within seven days or never uninstalled it after installing during August and September 2018?,"WITH --List of users who installed sept_cohort AS ( @@ -11168,7 +11168,7 @@ COUNT(DISTINCT CASE WHEN days_to_uninstall > 7 OR days_to_uninstall IS NULL THEN user_pseudo_id END) / COUNT(DISTINCT user_pseudo_id) AS percent_users_7_days -FROM joined",events_*.event_date; events_*.event_name; events_*.user_pseudo_id,3,lite_sql,sf_ga019 +FROM joined",events_*.event_date; events_*.event_name; events_*.user_pseudo_id,3,20,lite_sql,sf_ga019 ga020,firebase,bigquery,"Which quickplay event type had the lowest user retention rate during the second week after their initial engagement, for users who first engaged between August 1 and August 15, 2018?","-- Define the date range and calculate the minimum date for filtering results WITH dates AS ( SELECT @@ -11261,7 +11261,7 @@ FROM RETENTION_INFO WHERE weeks_since_event = 2 ORDER BY retention_rate -LIMIT 1",events_*.event_date; events_*.event_name; events_*.user_pseudo_id,3,lite_sql,sf_ga020 +LIMIT 1",events_*.event_date; events_*.event_name; events_*.user_pseudo_id,3,20,lite_sql,sf_ga020 ga021,firebase,bigquery,"What is the retention rate for users two weeks after their initial quickplay event, calculated separately for each quickplay event type, within the period from July 2, 2018, to July 16, 2018? Please focus on users who started a session (session_start) during this period.","-- Define the date range and calculate the minimum date for filtering results WITH dates AS ( SELECT @@ -11351,7 +11351,7 @@ ORDER BY SELECT event_cohort, retention_rate FROM RETENTION_INFO -WHERE weeks_since_event = 2",events_*.event_date; events_*.event_name; events_*.user_pseudo_id,3,lite_sql,sf_ga021 +WHERE weeks_since_event = 2",events_*.event_date; events_*.event_name; events_*.user_pseudo_id,3,20,lite_sql,sf_ga021 ga022,firebase,bigquery,"Could you please help me get the weekly customer retention rate in September 2018 for new customers who first used our app within the first week starting from September 1st, 2018 (timezone in Shanghai)? The retention rates should cover the following 3-week period after the initial use and display them in column format.","WITH analytics_data AS ( SELECT user_pseudo_id, event_timestamp, event_name, UNIX_MICROS(TIMESTAMP(""2018-09-01 00:00:00"", ""+8:00"")) AS start_day, @@ -11398,7 +11398,7 @@ FROM ( (SELECT count(*) FROM week_3_users JOIN week_0_users USING (user_pseudo_id)) AS week_3_cohort -)",events_*.event_name; events_*.event_timestamp; events_*.user_pseudo_id,3,lite_sql,sf_ga022 +)",events_*.event_name; events_*.event_timestamp; events_*.user_pseudo_id,3,20,lite_sql,sf_ga022 ga028,firebase,bigquery,"Please perform a 7-day retention analysis for users who first session start the app during the week starting on July 2, 2018. For each week from Week 0 (the week of their first session) to Week 4, provide the total number of new users in Week 0 and the number of retained users for each subsequent week.","WITH dates AS ( SELECT DATE('2018-07-02') AS start_date, @@ -11479,7 +11479,7 @@ RETENTION_INFO AS ( SELECT weeks_since_start, retained_users FROM RETENTION_INFO -WHERE week_cohort = DATE('2018-07-02')",events_*.event_date; events_*.event_name; events_*.user_first_touch_timestamp; events_*.user_pseudo_id,4,lite_sql,sf_ga028 +WHERE week_cohort = DATE('2018-07-02')",events_*.event_date; events_*.event_name; events_*.user_first_touch_timestamp; events_*.user_pseudo_id,4,20,lite_sql,sf_ga028 local003,E_commerce,sqlite,"According to the RFM definition document, how much is the average sales per order for each customer within distinct RFM segments, considering only 'delivered' orders? Please rank the customers into segments to analyze differences in average sales across these segments","WITH RecencyScore AS ( SELECT customer_unique_id, MAX(order_purchase_timestamp) AS last_purchase, @@ -11534,7 +11534,7 @@ RFM AS ( SELECT RFM_Bucket, AVG(total_spent / total_orders) AS avg_sales_per_customer FROM RFM -GROUP BY RFM_Bucket",customers.customer_id; customers.customer_unique_id; order_items.order_id; order_items.price; orders.customer_id; orders.order_id; orders.order_purchase_timestamp; orders.order_status,8,lite_sql,sf_local003 +GROUP BY RFM_Bucket",customers.customer_id; customers.customer_unique_id; order_items.order_id; order_items.price; orders.customer_id; orders.order_id; orders.order_purchase_timestamp; orders.order_status,8,70,lite_sql,sf_local003 local004,E_commerce,sqlite,"Could you tell me the number of orders, average payment per order and customer lifespan in weeks of the 3 custumers with the highest average payment per order. Attention: I want the lifespan in float number if it's longer than one week, otherwise set it to be 1.0.","WITH CustomerData AS ( SELECT customer_unique_id, @@ -11559,7 +11559,7 @@ SELECT END AS ACL FROM CustomerData ORDER BY AOV DESC -LIMIT 3",customers.customer_id; customers.customer_unique_id; order_payments.order_id; order_payments.payment_value; orders.customer_id; orders.order_id; orders.order_purchase_timestamp,7,snow_sql_near_exact,sf_local004 +LIMIT 3",customers.customer_id; customers.customer_unique_id; order_payments.order_id; order_payments.payment_value; orders.customer_id; orders.order_id; orders.order_purchase_timestamp,7,70,snow_sql_near_exact,sf_local004 local008,Baseball,sqlite,"I would like to know the given names of baseball players who have achieved the highest value of games played, runs, hits, and home runs, with their corresponding score values.","WITH player_stats AS ( SELECT b.player_id, @@ -11593,7 +11593,7 @@ UNION ALL SELECT 'Home Runs' AS Category, player_name AS Player_Name, home_runs AS Batting_Table_Topper FROM player_stats -WHERE home_runs = (SELECT MAX(home_runs) FROM player_stats);",batting.g; batting.h; batting.hr; batting.player_id; batting.r; player.name_given; player.player_id,7,lite_sql,sf_local008 +WHERE home_runs = (SELECT MAX(home_runs) FROM player_stats);",batting.g; batting.h; batting.hr; batting.player_id; batting.r; player.name_given; player.player_id,7,352,lite_sql,sf_local008 local017,California_Traffic_Collision,sqlite,In which year were the two most common causes of traffic accidents different from those in other years?,"WITH AnnualTotals AS ( SELECT STRFTIME('%Y', collision_date) AS Year, @@ -11665,7 +11665,7 @@ WHERE rc.Rank <= 2 ) -SELECT distinct Year FROM results",collisions.case_id; collisions.collision_date; collisions.pcf_violation_category,3,lite_sql,sf_local017 +SELECT distinct Year FROM results",collisions.case_id; collisions.collision_date; collisions.pcf_violation_category,3,120,lite_sql,sf_local017 local019,WWE,sqlite,"For the NXT title that had the shortest match (excluding titles with ""title change""), what were the names of the two wrestlers involved?","WITH MatchDetails AS ( SELECT b.name AS titles, @@ -11713,7 +11713,7 @@ SELECT FROM Rank1 ORDER BY match_duration -LIMIT 1",Belts.id; Belts.name; Cards.event_id; Cards.id; Cards.location_id; Cards.promotion_id; Events.id; Events.name; Locations.id; Locations.name; Matches.card_id; Matches.duration; Matches.loser_id; Matches.title_id; Matches.win_type; Matches.winner_id; Promotions.id; Promotions.name; Wrestlers.id; Wrestlers.name,20,lite_sql,sf_local019 +LIMIT 1",Belts.id; Belts.name; Cards.event_id; Cards.id; Cards.location_id; Cards.promotion_id; Events.id; Events.name; Locations.id; Locations.name; Matches.card_id; Matches.duration; Matches.loser_id; Matches.title_id; Matches.win_type; Matches.winner_id; Promotions.id; Promotions.name; Wrestlers.id; Wrestlers.name,20,35,lite_sql,sf_local019 local022,IPL,sqlite,"Show me the names of strikers who scored no less than 100 runs in a match, but their team lost the game?","-- Step 1: Calculate players' total runs in each match WITH player_runs AS ( SELECT @@ -11776,7 +11776,7 @@ JOIN ON p.player_id = plt.player_id ORDER BY - p.player_name;",ball_by_ball.ball_id; ball_by_ball.innings_no; ball_by_ball.match_id; ball_by_ball.over_id; ball_by_ball.striker; batsman_scored.ball_id; batsman_scored.innings_no; batsman_scored.match_id; batsman_scored.over_id; batsman_scored.runs_scored; match.match_id; match.match_winner; match.team_1; match.team_2; player.player_id; player.player_name; player_match.match_id; player_match.player_id; player_match.team_id,19,snow_sql_near_exact,sf_local022 + p.player_name;",ball_by_ball.ball_id; ball_by_ball.innings_no; ball_by_ball.match_id; ball_by_ball.over_id; ball_by_ball.striker; batsman_scored.ball_id; batsman_scored.innings_no; batsman_scored.match_id; batsman_scored.over_id; batsman_scored.runs_scored; match.match_id; match.match_winner; match.team_1; match.team_2; player.player_id; player.player_name; player_match.match_id; player_match.player_id; player_match.team_id,19,52,snow_sql_near_exact,sf_local022 local023,IPL,sqlite,"Please help me find the names of top 5 players with the highest average runs per match in season 5, along with their batting averages.","WITH runs_scored AS ( SELECT bb.striker AS player_id, @@ -11824,7 +11824,7 @@ FROM JOIN batting_averages AS b ON p.player_id = b.player_id ORDER BY - b.batting_avg DESC;",ball_by_ball.ball_id; ball_by_ball.innings_no; ball_by_ball.match_id; ball_by_ball.over_id; ball_by_ball.striker; batsman_scored.ball_id; batsman_scored.innings_no; batsman_scored.match_id; batsman_scored.over_id; batsman_scored.runs_scored; match.match_id; match.season_id; player.player_id; player.player_name,14,lite_sql,sf_local023 + b.batting_avg DESC;",ball_by_ball.ball_id; ball_by_ball.innings_no; ball_by_ball.match_id; ball_by_ball.over_id; ball_by_ball.striker; batsman_scored.ball_id; batsman_scored.innings_no; batsman_scored.match_id; batsman_scored.over_id; batsman_scored.runs_scored; match.match_id; match.season_id; player.player_id; player.player_name,14,52,lite_sql,sf_local023 local029,Brazilian_E_Commerce,sqlite,"Please calculate the average payment value, city, and state for the top 3 customers with the most delivered orders.","WITH customer_orders AS ( SELECT c.customer_unique_id, @@ -11845,7 +11845,7 @@ SELECT customer_state FROM customer_orders ORDER BY Total_Orders_By_Customers DESC -LIMIT 3;",olist_customers.customer_city; olist_customers.customer_id; olist_customers.customer_state; olist_customers.customer_unique_id; olist_order_payments.order_id; olist_order_payments.payment_value; olist_orders.customer_id; olist_orders.order_id; olist_orders.order_status,9,lite_sql,sf_local029 +LIMIT 3;",olist_customers.customer_city; olist_customers.customer_id; olist_customers.customer_state; olist_customers.customer_unique_id; olist_order_payments.order_id; olist_order_payments.payment_value; olist_orders.customer_id; olist_orders.order_id; olist_orders.order_status,9,62,lite_sql,sf_local029 local038,Pagila,sqlite,"Could you help me find the actor who appeared most in English G or PG-rated children's movies no longer than 2 hours, released between 2000 and 2010?Give me a full name.","SELECT actor.first_name || ' ' || actor.last_name AS full_name FROM @@ -11866,7 +11866,7 @@ GROUP BY actor.actor_id, actor.first_name, actor.last_name ORDER BY COUNT(film.film_id) DESC -LIMIT 1;",actor.actor_id; actor.first_name; actor.last_name; category.category_id; category.name; film.film_id; film.language_id; film.length; film.rating; film.release_year; film_actor.actor_id; film_actor.film_id; film_category.category_id; film_category.film_id; language.language_id; language.name,16,snow_sql_near_exact,sf_local038 +LIMIT 1;",actor.actor_id; actor.first_name; actor.last_name; category.category_id; category.name; film.film_id; film.language_id; film.length; film.rating; film.release_year; film_actor.actor_id; film_actor.film_id; film_category.category_id; film_category.film_id; language.language_id; language.name,16,120,snow_sql_near_exact,sf_local038 local039,Pagila,sqlite,"Please help me find the film category with the highest total rental hours in cities where the city's name either starts with ""A"" or contains a hyphen. ","SELECT category.name FROM @@ -11885,7 +11885,7 @@ GROUP BY ORDER BY SUM(CAST((julianday(rental.return_date) - julianday(rental.rental_date)) * 24 AS INTEGER)) DESC LIMIT - 1;",address.address_id; address.city_id; category.category_id; category.name; city.city; city.city_id; customer.address_id; customer.customer_id; film.film_id; film_category.category_id; film_category.film_id; inventory.film_id; inventory.inventory_id; rental.customer_id; rental.inventory_id; rental.rental_date; rental.return_date,17,snow_sql_near_exact,sf_local039 + 1;",address.address_id; address.city_id; category.category_id; category.name; city.city; city.city_id; customer.address_id; customer.customer_id; film.film_id; film_category.category_id; film_category.film_id; inventory.film_id; inventory.inventory_id; rental.customer_id; rental.inventory_id; rental.rental_date; rental.return_date,17,120,snow_sql_near_exact,sf_local039 local058,education_business,sqlite,"Can you provide a list of hardware product segments along with their unique product counts for 2020 in the output, ordered by the highest percentage increase in unique fact sales products from 2020 to 2021?","WITH UniqueProducts2020 AS ( SELECT dp.segment, @@ -11920,7 +11920,7 @@ FROM JOIN UniqueProducts2021 fup ON spc.segment = fup.segment ORDER BY - ((fup.unique_products_2021 - spc.unique_products_2020) * 100.0) / (spc.unique_products_2020) DESC;",hardware_dim_product.product_code; hardware_dim_product.segment; hardware_fact_sales_monthly.fiscal_year; hardware_fact_sales_monthly.product_code,4,lite_sql,sf_local058 + ((fup.unique_products_2021 - spc.unique_products_2020) * 100.0) / (spc.unique_products_2020) DESC;",hardware_dim_product.product_code; hardware_dim_product.segment; hardware_fact_sales_monthly.fiscal_year; hardware_fact_sales_monthly.product_code,4,98,lite_sql,sf_local058 local065,modern_data,sqlite,Calculate the total income from Meat Lovers pizzas priced at $12 and Vegetarian pizzas at $10. Include any extra toppings charged at $1 each. Ensure that canceled orders are filtered out. How much money has Pizza Runner earned in total?,"WITH get_extras_count AS ( WITH RECURSIVE split_extras AS ( SELECT @@ -11978,7 +11978,7 @@ calculate_totals AS ( SELECT SUM(total_price) + SUM(total_extras) AS total_income FROM - calculate_totals;",pizza_*.extras; pizza_*.order_id; pizza_*.pizza_id; pizza_clean_runner_orders.cancellation; pizza_clean_runner_orders.order_id,5,lite_sql,sf_local065 + calculate_totals;",pizza_*.extras; pizza_*.order_id; pizza_*.pizza_id; pizza_clean_runner_orders.cancellation; pizza_clean_runner_orders.order_id,5,77,lite_sql,sf_local065 local066,modern_data,sqlite,"Based on our customer pizza order information, summarize the total quantity of each ingredient used in the pizzas we delivered. Output the name and quantity for each ingredient.","WITH cte_cleaned_customer_orders AS ( SELECT *, @@ -12106,7 +12106,7 @@ ON GROUP BY t2.topping_name ORDER BY - topping_count DESC;",pizza_*.exclusions; pizza_*.extras; pizza_*.order_id; pizza_*.pizza_id; pizza_c_*.customer_id; pizza_c_*.order_time; pizza_recipes.pizza_id; pizza_recipes.toppings; pizza_toppings.topping_id; pizza_toppings.topping_name,10,lite_sql,sf_local066 + topping_count DESC;",pizza_*.exclusions; pizza_*.extras; pizza_*.order_id; pizza_*.pizza_id; pizza_c_*.customer_id; pizza_c_*.order_time; pizza_recipes.pizza_id; pizza_recipes.toppings; pizza_toppings.topping_id; pizza_toppings.topping_name,10,77,lite_sql,sf_local066 local075,bank_sales_trading,sqlite,"Can you provide a breakdown of how many times each product was viewed, how many times they were added to the shopping cart, and how many times they were left in the cart without being purchased? Also, give me the count of actual purchases for each product. Ensure that products with a page id in (1, 2, 12, 13) are filtered out.","WITH product_viewed AS ( SELECT t1.page_id, @@ -12193,7 +12193,7 @@ ON JOIN product_abandoned AS t4 ON - t4.page_id = t1.page_id;",shopping_cart_events.event_type; shopping_cart_events.page_id; shopping_cart_events.visit_id; shopping_cart_page_hierarchy.page_id; shopping_cart_page_hierarchy.page_name; shopping_cart_page_hierarchy.product_id,6,lite_sql,sf_local075 + t4.page_id = t1.page_id;",shopping_cart_events.event_type; shopping_cart_events.page_id; shopping_cart_events.visit_id; shopping_cart_page_hierarchy.page_id; shopping_cart_page_hierarchy.page_name; shopping_cart_page_hierarchy.product_id,6,106,lite_sql,sf_local075 local078,bank_sales_trading,sqlite,"Identify the top 10 and bottom 10 interest categories based on their highest composition values across all months. For each category, display the time(MM-YYYY), interest name, and the composition value","WITH get_interest_rank AS ( SELECT t1.month_year, @@ -12246,7 +12246,7 @@ SELECT * FROM get_bottom_10 ORDER BY - composition DESC;",interest_map.id; interest_map.interest_name; interest_metrics.composition; interest_metrics.interest_id; interest_metrics.month_year,5,lite_sql,sf_local078 + composition DESC;",interest_map.id; interest_map.interest_name; interest_metrics.composition; interest_metrics.interest_id; interest_metrics.month_year,5,106,lite_sql,sf_local078 local099,Db-IMDB,sqlite,I need you to look into the actor collaborations and tell me how many actors have made more films with Yash Chopra than with any other director. This will help us understand his influence on the industry better.,"WITH YASH_CHOPRAS_PID AS ( SELECT TRIM(P.PID) AS PID @@ -12310,7 +12310,7 @@ WHERE ACTORS_MOV_COMPARISION WHERE MORE_MOV_BY_YC = 'Y' - );",M_*.MID; M_*.PID; Person.Name; Person.PID,4,lite_sql,sf_local099 + );",M_*.MID; M_*.PID; Person.Name; Person.PID,4,50,lite_sql,sf_local099 local131,EntertainmentAgency,sqlite,"Could you list each musical style with the number of times it appears as a 1st, 2nd, or 3rd preference in a single row per style?","SELECT Musical_Styles.StyleName, COUNT(RankedPreferences.FirstStyle) @@ -12345,7 +12345,7 @@ HAVING COUNT(FirstStyle) > 0 OR COUNT(ThirdStyle) > 0 ORDER BY FirstPreference DESC, SecondPreference DESC, - ThirdPreference DESC, StyleID;",Musical_Preferences.PreferenceSeq; Musical_Preferences.StyleID; Musical_Styles.StyleID; Musical_Styles.StyleName,4,lite_sql,sf_local131 + ThirdPreference DESC, StyleID;",Musical_Preferences.PreferenceSeq; Musical_Preferences.StyleID; Musical_Styles.StyleID; Musical_Styles.StyleName,4,76,lite_sql,sf_local131 local163,education_business,sqlite,"Which university faculty members' salaries are closest to the average salary for their respective ranks? Please provide the ranks, first names, last names, and salaries.university","WITH AvgSalaries AS ( SELECT facrank AS FacRank, @@ -12384,7 +12384,7 @@ SELECT FROM SalaryDifferences s JOIN - MinDifferences m ON s.FacRank = m.FacRank AND s.Diff = m.MinDiff;",university_faculty.FacFirstName; university_faculty.FacLastName; university_faculty.FacRank; university_faculty.FacSalary,4,lite_sql,sf_local163 + MinDifferences m ON s.FacRank = m.FacRank AND s.Diff = m.MinDiff;",university_faculty.FacFirstName; university_faculty.FacLastName; university_faculty.FacRank; university_faculty.FacSalary,4,98,lite_sql,sf_local163 local197,sqlite-sakila,sqlite,"Can you determine which of our top 10 paying customers had the highest payment difference in any given month? I’d like to know the highest payment difference for this customer, with the result rounded to two decimal places.","WITH result_table AS ( SELECT strftime('%m', pm.payment_date) AS pay_mon, @@ -12438,7 +12438,7 @@ WHERE ORDER BY max_diff DESC LIMIT - 1;",payment.amount; payment.customer_id; payment.payment_date,3,lite_sql,sf_local197 + 1;",payment.amount; payment.customer_id; payment.payment_date,3,120,lite_sql,sf_local197 local199,sqlite-sakila,sqlite,"Can you identify the year and month with the highest rental orders created by the store's staff for each store? Please list the store ID, the year, the month, and the total rentals for those dates.","WITH result_table AS ( SELECT strftime('%Y', RE.RENTAL_DATE) AS YEAR, @@ -12486,7 +12486,7 @@ FROM WHERE total_rentals = max_rentals ORDER BY - STORE_ID;",rental.rental_date; rental.staff_id; staff.staff_id; staff.store_id,4,snow_sql_near_exact,sf_local199 + STORE_ID;",rental.rental_date; rental.staff_id; staff.staff_id; staff.store_id,4,120,snow_sql_near_exact,sf_local199 local210,delivery_center,sqlite,Can you identify the hubs that saw more than a 20% increase in finished orders from February to March?,"WITH february_orders AS ( SELECT h.hub_name AS hub_name, @@ -12524,7 +12524,7 @@ LEFT JOIN WHERE fo.orders_february > 0 AND mo.orders_march > 0 AND - (CAST((mo.orders_march - fo.orders_february) AS REAL) / CAST(fo.orders_february AS REAL)) > 0.2 -- Filter for hubs with more than a 20% increase",hubs.hub_id; hubs.hub_name; orders.order_created_month; orders.order_created_year; orders.order_id; orders.order_status; orders.store_id; stores.hub_id; stores.store_id,9,snow_sql_near_exact,sf_local210 + (CAST((mo.orders_march - fo.orders_february) AS REAL) / CAST(fo.orders_february AS REAL)) > 0.2 -- Filter for hubs with more than a 20% increase",hubs.hub_id; hubs.hub_name; orders.order_created_month; orders.order_created_year; orders.order_id; orders.order_status; orders.store_id; stores.hub_id; stores.store_id,9,59,snow_sql_near_exact,sf_local210 local219,EU_soccer,sqlite,Which single team has the fewest wins in each league?,"WITH match_view AS( SELECT M.id, @@ -12660,7 +12660,7 @@ FROM WHERE rn = 1 -- Getting the team with the least number of wins in each league ORDER BY - league;",League.id; League.name; Match.away_player_1; Match.away_player_10; Match.away_player_11; Match.away_player_2; Match.away_player_3; Match.away_player_4; Match.away_player_5; Match.away_player_6; Match.away_player_7; Match.away_player_8; Match.away_player_9; Match.away_team_api_id; Match.away_team_goal; Match.card; Match.goal; Match.home_player_1; Match.home_player_10; Match.home_player_11; Match.home_player_2; Match.home_player_3; Match.home_player_4; Match.home_player_5; Match.home_player_6; Match.home_player_7; Match.home_player_8; Match.home_player_9; Match.home_team_api_id; Match.home_team_goal; Match.id; Match.league_id; Match.match_api_id; Match.season; Player.player_api_id; Player.player_name; Team.team_api_id; Team.team_long_name,38,lite_sql,sf_local219 + league;",League.id; League.name; Match.away_player_1; Match.away_player_10; Match.away_player_11; Match.away_player_2; Match.away_player_3; Match.away_player_4; Match.away_player_5; Match.away_player_6; Match.away_player_7; Match.away_player_8; Match.away_player_9; Match.away_team_api_id; Match.away_team_goal; Match.card; Match.goal; Match.home_player_1; Match.home_player_10; Match.home_player_11; Match.home_player_2; Match.home_player_3; Match.home_player_4; Match.home_player_5; Match.home_player_6; Match.home_player_7; Match.home_player_8; Match.home_player_9; Match.home_team_api_id; Match.home_team_goal; Match.id; Match.league_id; Match.match_api_id; Match.season; Player.player_api_id; Player.player_name; Team.team_api_id; Team.team_long_name,38,233,lite_sql,sf_local219 local301,bank_sales_trading,sqlite,"For weekly-sales data, I need an analysis of our sales performance around mid-June for the years 2018, 2019, and 2020. Specifically, calculate the percentage change in sales between the four weeks leading up to June 15 and the four weeks following June 15 for each year.","SELECT before_effect, after_effect, @@ -12717,7 +12717,7 @@ FROM ( FROM cleaned_weekly_sales ) add_delta_weeks ) AS add_before_after -ORDER BY year;",cleaned_weekly_sales.sales; cleaned_weekly_sales.week_date,2,lite_sql,sf_local301 +ORDER BY year;",cleaned_weekly_sales.sales; cleaned_weekly_sales.week_date,2,106,lite_sql,sf_local301 local309,f1,sqlite,"For each year, which driver and which constructor scored the most points? I want the full name of each driver.","with year_points as ( select races.year, drivers.forename || ' ' || drivers.surname as driver, @@ -12758,4 +12758,4 @@ left join year_points as constructors_year_points on max_points.year = constructors_year_points.year and max_points.max_constructor_points = constructors_year_points.points and constructors_year_points.constructor is not null -order by max_points.year;",constructor_standings.constructor_id; constructor_standings.points; constructor_standings.race_id; constructors.constructor_id; constructors.name; driver_*.driver_id; driver_standings_*.points; driver_standings_*.race_id; drivers_*.driver_id; drivers_ext.full_name; races.race_id; races.round; races.year; results.constructor_id; results.driver_id; results.points; results.race_id; sprint_results.constructor_id; sprint_results.driver_id; sprint_results.points; sprint_results.race_id,21,snow_sql_near_exact,sf_local309 +order by max_points.year;",constructor_standings.constructor_id; constructor_standings.points; constructor_standings.race_id; constructors.constructor_id; constructors.name; driver_*.driver_id; driver_standings_*.points; driver_standings_*.race_id; drivers_*.driver_id; drivers_ext.full_name; races.race_id; races.round; races.year; results.constructor_id; results.driver_id; results.points; results.race_id; sprint_results.constructor_id; sprint_results.driver_id; sprint_results.points; sprint_results.race_id,21,228,snow_sql_near_exact,sf_local309