thanhdath commited on
Commit
d86adb9
·
verified ·
1 Parent(s): b377f7d

Fix lite-256 gold for 94 dual-gold instances (use adjudicated lite-SQL-derived key) + join-key completeness patch (local003, local039, sf014); verified against prior released lite set

Browse files
Files changed (1) hide show
  1. evaluation_set/spider2_lite_256.csv +48 -48
evaluation_set/spider2_lite_256.csv CHANGED
@@ -88,7 +88,7 @@ FROM
88
  TractPop TP
89
  JOIN
90
  TractGroup TG
91
- ON TP.""StateCountyTractID"" = TG.""StateCountyTractID"";",Dim_CensusGeography.BlockGroupID; Dim_CensusGeography.StateCountyTractID; Dim_CensusGeography.StateName; Fact_CensusValues_ACS2021.BlockGroupID; Fact_CensusValues_ACS2021.CensusValue; Fact_CensusValues_ACS2021.MetricID,6,lite_sql,sf011
92
  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
93
  YEAR(claims.date_of_loss) AS year_of_loss,
94
  claims.nfip_community_name,
@@ -147,7 +147,7 @@ GROUP BY
147
  C.""ZipCode"", SB.""StateBenchmark_Over1HrTravelTime"", SB.""TotalStatePopulation""
148
  ORDER BY
149
  ""Total_Commuters_1Hr_Travel_Time"" DESC
150
- LIMIT 1;",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,9,snow_sql_near_exact,sf014
151
  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 (
152
  SELECT
153
  id,
@@ -268,7 +268,7 @@ FROM
268
  AND ps.user_id = poi.user_id
269
  AND ps.app_group_id = poi.app_group_id
270
  GROUP BY
271
- 1,2,3,4,5,6,7,8,9,10,11;",USERS_MESSAGES_PUSHNOTIFICATION_*.AD_TRACKING_ENABLED; USERS_MESSAGES_PUSHNOTIFICATION_*.APP_GROUP_ID; USERS_MESSAGES_PUSHNOTIFICATION_*.CAMPAIGN_ID; USERS_MESSAGES_PUSHNOTIFICATION_*.MESSAGE_VARIATION_API_ID; USERS_MESSAGES_PUSHNOTIFICATION_*.PLATFORM; USERS_MESSAGES_PUSHNOTIFICATION_*.TIME; USERS_MESSAGES_PUSHNOTIFICATION_*.USER_ID; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.APP_GROUP_ID; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.BROWSER; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.CAMPAIGN_ID; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.CARRIER; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.DEVICE_MODEL; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.MESSAGE_VARIATION_API_ID; USERS_MESSAGES_PUSHNOTIFICATION_INFLUENCEDOPEN_VIEW.MESSAGE_VARIATION_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.BROWSER; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.CAMPAIGN_ID; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.CARRIER; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.DEVICE_MODEL; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.MESSAGE_VARIATION_API_ID; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.MESSAGE_VARIATION_ID; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.PLATFORM; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.TIME; USERS_MESSAGES_PUSHNOTIFICATION_OPEN_VIEW.USER_ID,28,lite_sql,sf018
272
  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 (
273
  SELECT
274
  geo.geo_id,
@@ -299,7 +299,7 @@ JOIN zip_area_ranks AS areas
299
  ON (addr.id_zip = areas.geo_id)
300
  WHERE addr.state = 'FL' AND areas.country = 'United States' AND areas.zip_area_rank = 1
301
  ORDER BY LATITUDE DESC
302
- LIMIT 10;",GEOGRAPHY_CHARACTERISTICS.GEO_ID; GEOGRAPHY_CHARACTERISTICS.RELATIONSHIP_TYPE; GEOGRAPHY_CHARACTERISTICS.VALUE; GEOGRAPHY_RELATIONSHIPS.GEO_ID; GEOGRAPHY_RELATIONSHIPS.RELATED_GEO_ID; GEOGRAPHY_RELATIONSHIPS.RELATED_LEVEL; GEOGRAPHY_RELATIONSHIPS.RELATIONSHIP_TYPE; US_ADDRESSES.ID_ZIP; US_ADDRESSES.LATITUDE; US_ADDRESSES.LONGITUDE; US_ADDRESSES.NUMBER; US_ADDRESSES.STATE; US_ADDRESSES.STREET; US_ADDRESSES.STREET_TYPE,14,lite_sql,sf040
303
  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 (
304
  SELECT
305
  ticker,
@@ -320,7 +320,7 @@ FROM
320
  ytd_performance
321
  GROUP BY
322
  ticker, start_of_year_date, start_of_year_price, latest_date, latest_price
323
- ORDER BY percentage_change_ytd DESC;",STOCK_PRICE_TIMESERIES.DATE; STOCK_PRICE_TIMESERIES.TICKER; STOCK_PRICE_TIMESERIES.VALUE; STOCK_PRICE_TIMESERIES.VARIABLE,4,lite_sql,sf044
324
  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';
325
  DECLARE end_date STRING DEFAULT '20170228';
326
 
@@ -851,7 +851,7 @@ FROM
851
  highway_info
852
  ORDER BY
853
  highway_length DESC
854
- LIMIT 5;",PLANET_FEATURES.all_tags; PLANET_FEATURES.feature_type; PLANET_FEATURES.geometry; PLANET_FEATURES.osm_id,4,lite_sql,sf_bq017
855
  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 (
856
  SELECT
857
  date,
@@ -1038,7 +1038,7 @@ ON
1038
  AND PVP.""ProjectName"" = P.""Name""
1039
  ORDER BY
1040
  P.""StarsCount"" DESC
1041
- LIMIT 8;",PACKAGEVERSIONS.Name; PACKAGEVERSIONS.SnapshotAt; PACKAGEVERSIONS.System; PACKAGEVERSIONS.UpstreamPublishedAt; PACKAGEVERSIONS.Version; PACKAGEVERSIONS.VersionInfo; PACKAGEVERSIONTOPROJECT.Name; PACKAGEVERSIONTOPROJECT.ProjectName; PACKAGEVERSIONTOPROJECT.ProjectType; PACKAGEVERSIONTOPROJECT.RelationType; PACKAGEVERSIONTOPROJECT.System; PACKAGEVERSIONTOPROJECT.Version; PROJECTS.Name; PROJECTS.SnapshotAt; PROJECTS.StarsCount; PROJECTS.Type,16,lite_sql,sf_bq028
1042
  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 (
1043
  SELECT
1044
  DATE(CAST(year AS INT64), CAST(mo AS INT64), CAST(da AS INT64)) AS observation_date
@@ -1264,7 +1264,7 @@ WHERE
1264
  GROUP BY
1265
  TO_CHAR(Date_Series_Table.day, 'YYYY-MM')
1266
  ORDER BY
1267
- Patent_Date_YearMonth;",PUBLICATIONS.abstract_localized; PUBLICATIONS.country_code; PUBLICATIONS.filing_date; PUBLICATIONS.publication_number,4,lite_sql,sf_bq033
1268
  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 (
1269
  SELECT ST_GeogPoint(-87.6847, 41.8319) AS center,
1270
  50 AS maxdist_km
@@ -1494,7 +1494,7 @@ WHERE
1494
  genex.""HGNC_gene_symbol"" IN ('MDM2', 'TP53', 'CDKN1A','CCNE1')
1495
  ORDER BY
1496
  ""case_barcode"",
1497
- ""HGNC_gene_symbol"";",CLINICAL_GDC_R_*.demo__ethnicity; CLINICAL_GDC_R_*.demo__gender; CLINICAL_GDC_R_*.demo__race; CLINICAL_GDC_R_*.demo__vital_status; CLINICAL_GDC_R_*.diag__age_at_diagnosis; CLINICAL_GDC_R_*.diag__ajcc_clinical_stage; CLINICAL_GDC_R_*.diag__ajcc_pathologic_stage; CLINICAL_GDC_R_*.diag__year_of_diagnosis; CLINICAL_GDC_R_*.disease_type; CLINICAL_GDC_R_*.primary_site; CLINICAL_GDC_R_*.proj__project_id; CLINICAL_GDC_R_*.submitter_id; RNASEQ_HG19_GDC_2017_02.HGNC_gene_symbol; RNASEQ_HG19_GDC_2017_02.case_barcode; RNASEQ_HG19_GDC_2017_02.normalized_count; RNASEQ_HG19_GDC_2017_02.project_short_name; RNASEQ_HG19_GDC_2017_02.sample_barcode; SOMATIC_MUTATION_HG19_DCC_2017_02.Hugo_Symbol; SOMATIC_MUTATION_HG19_DCC_2017_02.Mutation_Status; SOMATIC_MUTATION_HG19_DCC_2017_02.case_barcode; SOMATIC_MUTATION_HG19_DCC_2017_02.project_short_name; SOMATIC_MUTATION_HG19_MC3_2017_02.Hugo_Symbol; SOMATIC_MUTATION_HG19_MC3_2017_02.case_barcode; SOMATIC_MUTATION_HG19_MC3_2017_02.project_short_name,24,lite_sql,sf_bq043
1498
  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
1499
  (
1500
  SELECT
@@ -1841,7 +1841,7 @@ JOIN (
1841
  OR cpc.""group_id"" = 'A01G'
1842
  ) AS filterData
1843
  ON app.""patent_id"" = filterData.""patent_id""
1844
- ORDER BY app.""date"";",APPLICATION.date; APPLICATION.patent_id; CPC_CURRENT.group_id; CPC_CURRENT.patent_id; CPC_CURRENT.subsection_id; PATENT.abstract; PATENT.country; PATENT.id; PATENT.title; USPATENTCITATION.citation_id; USPATENTCITATION.patent_id,11,lite_sql,sf_bq052
1845
  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
1846
  c.fall_color,
1847
  SUM(d.count_growth) AS change
@@ -1983,7 +1983,7 @@ FROM totals
1983
  INNER JOIN coinjoins
1984
  ON totals.tx_month = coinjoins.cjs_month
1985
  ORDER BY value_percent DESC
1986
- LIMIT 1;",TRANSACTIONS.block_timestamp; TRANSACTIONS.input_count; TRANSACTIONS.input_value; TRANSACTIONS.is_coinbase; TRANSACTIONS.output_count; TRANSACTIONS.output_value; TRANSACTIONS.outputs,7,lite_sql,sf_bq057
1987
  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 (
1988
  SELECT station_id
1989
  FROM
@@ -2360,7 +2360,7 @@ WHERE
2360
  AND (b.""tissue_type"" = 'normal' OR b.""tissue_type"" = 'tumor')
2361
  AND (c.""item_name"" = 'Embedding medium' AND c.""item_value"" = 'Tissue freezing medium')
2362
  ORDER BY
2363
- a.""crdc_instance_uuid"";",DICOM_ALL.Columns; DICOM_ALL.LossyImageCompressionMethod; DICOM_ALL.Modality; DICOM_ALL.PatientID; DICOM_ALL.PixelSpacing; DICOM_ALL.Rows; DICOM_ALL.SOPInstanceUID; DICOM_ALL.SeriesInstanceUID; DICOM_ALL.SpecimenDescriptionSequence; DICOM_ALL.StudyInstanceUID; DICOM_ALL.VolumetricProperties; DICOM_ALL.collection_id; DICOM_ALL.collection_name; DICOM_ALL.gcs_url; DICOM_ALL.idc_webapp_collection_id; DICOM_ALL.tcia_api_collection_id,16,lite_sql,sf_bq070
2364
  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 (
2365
  SELECT CAST(""Code"" AS INT) AS CODE
2366
  FROM DEATH.DEATH.RACE
@@ -2416,7 +2416,7 @@ JOIN (
2416
  WHERE ""Age"" BETWEEN 12 AND 18
2417
  GROUP BY ""Age""
2418
  ) g
2419
- ON g.""Age"" = v.""Age"";",DEATHRECORDS.Age; DEATHRECORDS.AgeType; DEATHRECORDS.Id; DEATHRECORDS.Race; ENTITYAXISCONDITIONS.DeathRecordId; ENTITYAXISCONDITIONS.Icd10Code; ICD10CODE.Code; ICD10CODE.Description; RACE_*.Code; RACE_*.Description,10,lite_sql,sf_bq072
2420
  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 (
2421
  SELECT geo_id, unemployed_pop AS unemployed_2018
2422
  FROM `bigquery-public-data.census_bureau_acs.county_2018_5yr`
@@ -2829,7 +2829,7 @@ MaxYearForTopAssignee AS (
2829
 
2830
  SELECT filing_year
2831
  FROM
2832
- MaxYearForTopAssignee",PUBLICATIONS.application_number; PUBLICATIONS.assignee; PUBLICATIONS.assignee_harmonized; PUBLICATIONS.cpc; PUBLICATIONS.filing_date; PUBLICATIONS.ipc,6,lite_sql,sf_bq091
2833
  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 (
2834
  -- Debits
2835
  SELECT
@@ -3207,7 +3207,7 @@ WHERE
3207
  rn = 1
3208
  ORDER BY
3209
  ""rank""
3210
- LIMIT 1;",INTERNATIONAL_TOP_RISING_TERMS.percent_gain; INTERNATIONAL_TOP_RISING_TERMS.rank; INTERNATIONAL_TOP_RISING_TERMS.refresh_date; INTERNATIONAL_TOP_RISING_TERMS.score; INTERNATIONAL_TOP_RISING_TERMS.term; INTERNATIONAL_TOP_RISING_TERMS.week; TOP_RISING_TERMS.percent_gain; TOP_RISING_TERMS.rank; TOP_RISING_TERMS.refresh_date; TOP_RISING_TERMS.score; TOP_RISING_TERMS.term; TOP_RISING_TERMS.week,12,lite_sql,sf_bq104
3211
  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
3212
  (
3213
  SELECT
@@ -3801,7 +3801,7 @@ FROM
3801
  LEFT JOIN cit ON fam.""family_id"" = cit.""family_id""
3802
  LEFT JOIN gpr ON fam.""family_id"" = gpr.""family_id""
3803
  WHERE
3804
- pub.""publication_date"" BETWEEN 20150101 AND 20150131;",ABS_AND_EMB.cited_by; ABS_AND_EMB.publication_number; PUBLICATIONS.citation; PUBLICATIONS.country_code; PUBLICATIONS.cpc; PUBLICATIONS.family_id; PUBLICATIONS.ipc; PUBLICATIONS.publication_date; PUBLICATIONS.publication_number,9,lite_sql,sf_bq127
3805
  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
3806
  patent.""title"",
3807
  patent.""abstract"",
@@ -3869,7 +3869,7 @@ JOIN (
3869
  ON app.""patent_id"" = filterData.""patent_id""
3870
  WHERE
3871
  TRY_CAST(app.""date"" AS DATE) < '2014-02-01'
3872
- 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.country; PATENT.date; PATENT.id; PATENT.title; USPATENTCITATION.citation_id; USPATENTCITATION.date; USPATENTCITATION.patent_id,14,lite_sql,sf_bq128
3873
  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 (
3874
  SELECT
3875
  b.state_name,
@@ -4196,7 +4196,7 @@ SELECT
4196
  ""mean_sq_between"" / ""mean_sq_within"" AS ""F""
4197
  FROM
4198
  numerator,
4199
- 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.Hugo_Symbol; SOMATIC_MUTATION_MC3.Variant_Classification; SOMATIC_MUTATION_MC3.project_short_name; SOMATIC_MUTATION_MC3.sample_barcode_tumor,8,lite_sql,sf_bq150
4200
  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
4201
  barcodes AS (
4202
  SELECT bcr_patient_barcode AS ParticipantBarcode
@@ -4746,7 +4746,7 @@ SELECT
4746
  ""UpvotesReceived"" AS ""UpvotesReceivedByUpvotedUser"",
4747
  ""UpvotesGiven"" AS ""UpvotesGivenByUpvotedUser""
4748
  FROM ReciprocalUpvotes
4749
- ORDER BY ""UpvotesReceived"" DESC, ""UpvotesGiven"" DESC;",FORUMMESSAGEVOTES.ForumMessageId; FORUMMESSAGEVOTES.FromUserId; FORUMMESSAGEVOTES.ToUserId; USERS.DisplayName; USERS.Id; USERS.UserName,6,lite_sql,sf_bq167
4750
  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 (
4751
  SELECT
4752
  drug_name AS drug_name,
@@ -4921,7 +4921,7 @@ SELECT
4921
  ""count""
4922
  FROM count_data
4923
  WHERE ""count"" >= 5
4924
- AND ""type"" = 'PullRequestEvent';",LANGUAGES.language; LANGUAGES.repo_name; _2023_*.created_at; _2023_*.repo; _2023_*.type,5,lite_sql,sf_bq182
4925
  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
4926
  AVG(TIMESTAMP_DIFF(dropoff_datetime, pickup_datetime, SECOND) / 60.0) AS average_trip_duration_in_minutes
4927
  FROM
@@ -5264,7 +5264,7 @@ SELECT
5264
  FROM
5265
  forward_citation
5266
  WHERE
5267
- ""forward_citations"" = 1;",PUBLICATIONS.application_kind; PUBLICATIONS.application_number; PUBLICATIONS.citation; PUBLICATIONS.filing_date; PUBLICATIONS.grant_date; PUBLICATIONS.publication_number,6,lite_sql,sf_bq209
5268
  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 (
5269
  SELECT
5270
  t1.""publication_number"" AS publication_number,
@@ -5290,7 +5290,7 @@ Publication_data AS (
5290
 
5291
  SELECT COUNT(nb_indep_claims)
5292
  FROM Publication_data
5293
- WHERE nb_indep_claims != 0",PUBLICATIONS.claims_localized; PUBLICATIONS.country_code; PUBLICATIONS.grant_date; PUBLICATIONS.kind_code; PUBLICATIONS.publication_number,5,lite_sql,sf_bq210
5294
  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(
5295
  SELECT
5296
  t1.""publication_number"",
@@ -5503,7 +5503,7 @@ FROM
5503
  middle_info
5504
  ORDER BY
5505
  ""category_corr_across_months""
5506
- LIMIT 1;",SALES.category_name; SALES.date; SALES.volume_sold_liters,3,lite_sql,sf_bq219
5507
  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 (
5508
  SELECT
5509
  cd.""parents"",
@@ -5651,7 +5651,7 @@ FROM moving_avg
5651
  JOIN ""PATENTS"".""PATENTS"".""CPC_DEFINITION"" c ON ""cpc_group"" = c.""symbol""
5652
  WHERE c.""level"" = 4
5653
  GROUP BY c.""titleFull"", ""cpc_group""
5654
- ORDER BY c.""titleFull"", ""cpc_group"" ASC;",CPC_DEFINITION.symbol; CPC_DEFINITION.titleFull; PUBLICATIONS.country_code; PUBLICATIONS.cpc; PUBLICATIONS.filing_date; PUBLICATIONS.grant_date; PUBLICATIONS.publication_number,7,lite_sql,sf_bq222
5655
  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
5656
  REPLACE(citing_assignee, '""', '') AS citing_assignee,
5657
  cpcdef.""titleFull"" AS cpc_title,
@@ -5686,7 +5686,7 @@ WHERE
5686
  refs.cited_assignee = 'DENSO CORP'
5687
  AND pubs.citing_assignee != 'DENSO CORP'
5688
  GROUP BY
5689
- citing_assignee, cpcdef.""titleFull""",CPC_DEFINITION.symbol; CPC_DEFINITION.titleFull; PUBLICATIONS.assignee_harmonized; PUBLICATIONS.citation; PUBLICATIONS.cpc; PUBLICATIONS.filing_date; PUBLICATIONS.publication_number,7,lite_sql,sf_bq223
5690
  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 (
5691
  SELECT
5692
  ""repo_name"",
@@ -5744,7 +5744,7 @@ INNER JOIN
5744
  watch_counts AS wc ON ar.""repo_name"" = wc.""repo""
5745
  ORDER BY
5746
  (fc.""forks"" + ic.""issue_events"" + wc.""watches"") DESC
5747
- LIMIT 1;",LICENSES.license; LICENSES.repo_name; _202204.created_at; _202204.repo; _202204.type,5,lite_sql,sf_bq224
5748
  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 (
5749
  SELECT minor_category
5750
  FROM `bigquery-public-data.london_crime.crime_by_lsoa`
@@ -6140,7 +6140,7 @@ JOIN (
6140
  ) AS filterData
6141
  ON app.""patent_id"" = filterData.""patent_id""
6142
  ORDER BY filterData.""bkwdCitations_3"" DESC
6143
- LIMIT 1;",APPLICATION.date; APPLICATION.patent_id; CPC_CURRENT.category; CPC_CURRENT.patent_id; PATENT.country; PATENT.id; PATENT.number; USPATENTCITATION.citation_id; USPATENTCITATION.patent_id,9,lite_sql,sf_bq246
6144
  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 (
6145
  SELECT
6146
  D.""id"",
@@ -6198,7 +6198,7 @@ sf_bq248,GITHUB_REPOS,snowflake,"What is the proportion of files whose paths inc
6198
  SELECT
6199
  (SELECT COUNT(*) FROM requests WHERE ""content"" LIKE '%Copyright (c)%') / COUNT(*) AS ""proportion""
6200
  FROM
6201
- requests;",LANGUAGES.language; LANGUAGES.repo_name; SAMPLE_CONTENTS.content; SAMPLE_CONTENTS.sample_path; SAMPLE_CONTENTS.sample_repo_name,5,lite_sql,sf_bq248
6202
  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 (
6203
  SELECT 'Singapore' AS value
6204
  ),
@@ -6261,7 +6261,7 @@ FROM
6261
  CROSS JOIN population p
6262
  GROUP BY distance
6263
  ORDER BY distance DESC
6264
- LIMIT 1;",PLANET_LAYERS.gdal_type; PLANET_LAYERS.geometry; PLANET_LAYERS.layer_class; PLANET_LAYERS.layer_name; PLANET_LAYERS.osm_id; POPULATION_GRID_1KM.alpha_3_code; 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,12,lite_sql,sf_bq250
6265
  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 (
6266
  SELECT
6267
  f.""id"",
@@ -6290,7 +6290,7 @@ WHERE
6290
  NOT c.""binary""
6291
  AND f.""path"" LIKE '%.swift'
6292
  ORDER BY c.""copies"" DESC
6293
- LIMIT 1;",SAMPLE_CONTENTS.binary; SAMPLE_CONTENTS.copies; SAMPLE_CONTENTS.id; SAMPLE_CONTENTS.sample_path; SAMPLE_FILES.id; SAMPLE_FILES.repo_name,6,lite_sql,sf_bq252
6294
  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 (
6295
  SELECT ""geometry"" AS geometry
6296
  FROM GEO_OPENSTREETMAP.GEO_OPENSTREETMAP.PLANET_FEATURES,
@@ -6351,7 +6351,7 @@ WHERE wd.""osm_id"" IS NOT NULL
6351
  AND baf.""feature_type"" = 'points'
6352
  GROUP BY pww.name
6353
  ORDER BY COUNT(baf.""osm_id"") DESC
6354
- LIMIT 2",PLANET_FEATURES.all_tags; PLANET_FEATURES.feature_type; PLANET_FEATURES.geometry; PLANET_FEATURES.osm_id; PLANET_FEATURES.osm_way_id; PLANET_FEATURES_POINTS.geometry,6,lite_sql,sf_bq254
6355
  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
6356
  COUNT(commits_table.""message"") AS ""num_messages""
6357
  FROM (
@@ -6647,7 +6647,7 @@ FROM
6647
  kite
6648
  ORDER BY
6649
  ""avg_order_value"" DESC
6650
- LIMIT 10;",ORDERS.created_at; ORDERS.order_id; ORDERS.status; ORDERS.user_id; ORDER_ITEMS.order_id; ORDER_ITEMS.sale_price; ORDER_ITEMS.status; USERS.created_at; USERS.email; USERS.id,10,lite_sql,sf_bq265
6651
  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
6652
 
6653
  visit AS (
@@ -6891,7 +6891,7 @@ LEFT JOIN monthly_sales AS previous_month
6891
  AND current_month.""delivery_month"" = DATEADD(MONTH, -1, previous_month.""delivery_month"") -- Correctly join to previous month
6892
  WHERE current_month.""delivery_month"" >= '2022-08-01' -- Only show August and later data, but use July for calculation
6893
  ORDER BY ""profit_vs_prior_month"" DESC
6894
- LIMIT 5;",INVENTORY_ITEMS.cost; INVENTORY_ITEMS.id; ORDERS.created_at; ORDERS.delivered_at; ORDERS.order_id; ORDERS.status; ORDERS.user_id; ORDER_ITEMS.inventory_item_id; ORDER_ITEMS.order_id; ORDER_ITEMS.sale_price; USERS.id; USERS.traffic_source,12,lite_sql,sf_bq273
6895
  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
6896
  visit AS (
6897
  SELECT fullvisitorid, MIN(date) AS date_first_visit
@@ -7419,7 +7419,7 @@ FROM
7419
  daily_forecasts
7420
  ORDER BY
7421
  ""creation_time"",
7422
- ""forecast_date"";",NOAA_GFS0P25.creation_time; NOAA_GFS0P25.forecast; NOAA_GFS0P25.geography; NOAA_GFS0P25.geography_polygon,4,lite_sql,sf_bq291
7423
  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
7424
  ""trip_id"",
7425
  ""duration_sec"",
@@ -8433,7 +8433,7 @@ GROUP BY
8433
  ""segmentation_category""
8434
  ORDER BY
8435
  ""count_"" DESC
8436
- LIMIT 5;",DICOM_ALL.DerivationImageSequence; DICOM_ALL.Modality; DICOM_ALL.ReferencedImageEvidenceSequence; DICOM_ALL.ReferencedImageSequence; DICOM_ALL.ReferencedSOPInstanceUID; DICOM_ALL.ReferencedSeriesSequence; DICOM_ALL.SOPClassUID; DICOM_ALL.SOPInstanceUID; DICOM_ALL.SourceImageSequence; DICOM_ALL.access; SEGMENTATIONS.SOPInstanceUID; SEGMENTATIONS.SegmentedPropertyCategory,12,lite_sql,sf_bq346
8437
  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 (
8438
  SELECT
8439
  ""dicom_all_mr"".""SOPInstanceUID"",
@@ -8527,7 +8527,7 @@ SELECT
8527
  ""osm_id""
8528
  FROM closest_to_median
8529
  ORDER BY diff_from_median
8530
- LIMIT 1;",PLANET_FEATURES.all_tags; PLANET_FEATURES.feature_type; PLANET_FEATURES.geometry; PLANET_FEATURES.osm_id; PLANET_FEATURES.osm_timestamp; PLANET_NODES.all_tags; PLANET_NODES.id; PLANET_NODES.latitude; PLANET_NODES.longitude,9,lite_sql,sf_bq349
8531
  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
8532
  my_drug_list ARRAY<STRING>;
8533
  SET
@@ -8726,7 +8726,7 @@ WHERE
8726
  AND DATE_TRUNC('DAY', TO_TIMESTAMP_NTZ(TO_NUMBER(""TRI"".""starttime"") / 1000000)) = DATE '2015-07-15'
8727
  ORDER BY
8728
  ""WEA"".""temp"" DESC, ""ZIPSTART"".""zip_code"" ASC, ""ZIPEND"".""zip_code"" DESC
8729
- LIMIT 1;",CITIBIKE_TRIPS.bikeid; CITIBIKE_TRIPS.end_station_latitude; CITIBIKE_TRIPS.end_station_longitude; CITIBIKE_TRIPS.start_station_latitude; CITIBIKE_TRIPS.start_station_longitude; CITIBIKE_TRIPS.starttime; GSOD_*.da; GSOD_*.mo; GSOD_*.temp; GSOD_*.wban; ZIP_CODES.city; ZIP_CODES.state_code; ZIP_CODES.zip_code; ZIP_CODES.zip_code_geom,14,lite_sql,sf_bq358
8730
  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 (
8731
  SELECT
8732
  t2.""repo_name"",
@@ -9020,7 +9020,7 @@ WHERE
9020
  GROUP BY
9021
  ""package_name""
9022
  ORDER BY
9023
- ""count"" DESC;",SAMPLE_CONTENTS.content; SAMPLE_CONTENTS.sample_path; SAMPLE_CONTENTS.sample_ref,3,lite_sql,sf_bq377
9024
  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 (
9025
  SELECT
9026
  AVG(associations.score) AS avg_score
@@ -9220,7 +9220,7 @@ FROM
9220
  JOIN
9221
  ""seg_studies""
9222
  ON
9223
- ""mr_studies"".""StudyInstanceUID"" = ""seg_studies"".""StudyInstanceUID"";",DICOM_ALL.SeriesDescription; DICOM_ALL.StudyInstanceUID; DICOM_ALL.collection_id; SEGMENTATIONS.SegmentedPropertyType; SEGMENTATIONS.StudyInstanceUID,5,lite_sql,sf_bq390
9224
  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
9225
  # FIRST CAST EACH YEAR, MONTH, DATE TO STRINGS
9226
  T AS (
@@ -10043,7 +10043,7 @@ SELECT
10043
  'Top 3 by Max Exposure' AS ""MetricGroup"",
10044
  AVG(""seriesSizeInMB"") AS ""AverageSeriesSizeInMB""
10045
  FROM
10046
- top3ByMaxExposure;",DICOM_ALL.Exposure; DICOM_ALL.ExposureInmAs; DICOM_ALL.Modality; DICOM_ALL.PatientID; DICOM_ALL.SeriesInstanceUID; DICOM_ALL.SliceThickness; DICOM_ALL.SpacingBetweenSlices; DICOM_ALL.collection_name; DICOM_ALL.instance_size,9,lite_sql,sf_bq422
10047
  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
10048
  id.country_name,
10049
  --cs.region,
@@ -10220,7 +10220,7 @@ FROM
10220
  base_census
10221
  ORDER BY
10222
  ""avg_median_income_diff"" DESC
10223
- LIMIT 5;",ZCTA5_2015_5YR.geo_id; ZCTA5_2015_5YR.median_income; ZCTA_*.employed_agriculture_forestry_fishing_hunting_mining; ZCTA_*.employed_arts_entertainment_recreation_accommodation_food; ZCTA_*.employed_construction; ZCTA_*.employed_information; ZCTA_*.employed_retail_trade; ZCTA_*.employed_wholesale_trade; ZCTA_*.geo_id; ZCTA_*.median_income; ZIP_CODES.state_name; ZIP_CODES.zip_code,12,lite_sql,sf_bq429
10224
  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
10225
  -- *,
10226
  greatest(heavy_atoms_1, heavy_atoms_2) as heavy_atoms_greatest,
@@ -10382,7 +10382,7 @@ SELECT
10382
  FROM parsed_burn_logs
10383
 
10384
  ORDER BY block_timestamp
10385
- LIMIT 5;",LOGS.address; LOGS.block_number; LOGS.block_timestamp; LOGS.log_index; LOGS.topics; LOGS.transaction_hash,6,lite_sql,sf_bq444
10386
  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 *
10387
  FROM (
10388
  SELECT
@@ -10715,7 +10715,7 @@ FROM
10715
  geometryChecks
10716
  ORDER BY
10717
  geometryChecks.""seriesSizeInMiB"" DESC
10718
- LIMIT 5;",DICOM_ALL.Columns; DICOM_ALL.Exposure; DICOM_ALL.ExposureInmAs; DICOM_ALL.ImageOrientationPatient; DICOM_ALL.ImagePositionPatient; DICOM_ALL.ImageType; DICOM_ALL.Modality; DICOM_ALL.PatientID; DICOM_ALL.PixelSpacing; DICOM_ALL.Rows; DICOM_ALL.SeriesInstanceUID; DICOM_ALL.SeriesNumber; DICOM_ALL.TransferSyntaxUID; DICOM_ALL.XRayTubeCurrentInmA; DICOM_ALL.collection_name; DICOM_ALL.instance_size,16,lite_sql,sf_bq455
10719
  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
10720
  Params AS (
10721
  SELECT 'Google Navy Speckled Tee' AS selected_product
@@ -10752,7 +10752,7 @@ WHERE
10752
  AND items.item_name != selected_product
10753
  GROUP BY 1
10754
  ORDER BY item_quantity DESC
10755
- LIMIT 1;",events_*.ecommerce; events_*.event_name; events_*.items,3,lite_sql,sf_ga001
10756
  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
10757
  Params AS (
10758
  SELECT 'Google Red Speckled Tee' AS selected_product
@@ -11534,7 +11534,7 @@ RFM AS (
11534
  SELECT RFM_Bucket,
11535
  AVG(total_spent / total_orders) AS avg_sales_per_customer
11536
  FROM RFM
11537
- GROUP BY RFM_Bucket",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; orders.order_status,8,lite_sql,sf_local003
11538
  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 (
11539
  SELECT
11540
  customer_unique_id,
@@ -11713,7 +11713,7 @@ SELECT
11713
  FROM
11714
  Rank1
11715
  ORDER BY match_duration
11716
- LIMIT 1",Belts.id; Belts.name; Matches.duration; Matches.loser_id; Matches.title_change; Matches.title_id; Matches.winner_id; Wrestlers.id; Wrestlers.name,9,lite_sql,sf_local019
11717
  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
11718
  WITH player_runs AS (
11719
  SELECT
@@ -11885,7 +11885,7 @@ GROUP BY
11885
  ORDER BY
11886
  SUM(CAST((julianday(rental.return_date) - julianday(rental.rental_date)) * 24 AS INTEGER)) DESC
11887
  LIMIT
11888
- 1;",address.address_id; address.city_id; category.category_id; category.name; city.city; city.city_id; customer.address_id; customer.customer_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,16,snow_sql_near_exact,sf_local039
11889
  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 (
11890
  SELECT
11891
  dp.segment,
@@ -12193,7 +12193,7 @@ ON
12193
  JOIN
12194
  product_abandoned AS t4
12195
  ON
12196
- t4.page_id = t1.page_id;",shopping_cart_events.event_type; shopping_cart_events.page_id; shopping_cart_events.sequence_number; shopping_cart_events.visit_id; shopping_cart_page_hierarchy.page_id; shopping_cart_page_hierarchy.page_name; shopping_cart_page_hierarchy.product_category; shopping_cart_page_hierarchy.product_id,8,lite_sql,sf_local075
12197
  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 (
12198
  SELECT
12199
  t1.month_year,
 
88
  TractPop TP
89
  JOIN
90
  TractGroup TG
91
+ 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
92
  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
93
  YEAR(claims.date_of_loss) AS year_of_loss,
94
  claims.nfip_community_name,
 
147
  C.""ZipCode"", SB.""StateBenchmark_Over1HrTravelTime"", SB.""TotalStatePopulation""
148
  ORDER BY
149
  ""Total_Commuters_1Hr_Travel_Time"" DESC
150
+ 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
151
  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 (
152
  SELECT
153
  id,
 
268
  AND ps.user_id = poi.user_id
269
  AND ps.app_group_id = poi.app_group_id
270
  GROUP BY
271
+ 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
272
  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 (
273
  SELECT
274
  geo.geo_id,
 
299
  ON (addr.id_zip = areas.geo_id)
300
  WHERE addr.state = 'FL' AND areas.country = 'United States' AND areas.zip_area_rank = 1
301
  ORDER BY LATITUDE DESC
302
+ 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
303
  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 (
304
  SELECT
305
  ticker,
 
320
  ytd_performance
321
  GROUP BY
322
  ticker, start_of_year_date, start_of_year_price, latest_date, latest_price
323
+ 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
324
  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';
325
  DECLARE end_date STRING DEFAULT '20170228';
326
 
 
851
  highway_info
852
  ORDER BY
853
  highway_length DESC
854
+ LIMIT 5;",PLANET_FEATURES.all_tags; PLANET_FEATURES.feature_type; PLANET_FEATURES.geometry,3,lite_sql,sf_bq017
855
  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 (
856
  SELECT
857
  date,
 
1038
  AND PVP.""ProjectName"" = P.""Name""
1039
  ORDER BY
1040
  P.""StarsCount"" DESC
1041
+ 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
1042
  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 (
1043
  SELECT
1044
  DATE(CAST(year AS INT64), CAST(mo AS INT64), CAST(da AS INT64)) AS observation_date
 
1264
  GROUP BY
1265
  TO_CHAR(Date_Series_Table.day, 'YYYY-MM')
1266
  ORDER BY
1267
+ Patent_Date_YearMonth;",PUBLICATIONS.abstract_localized; PUBLICATIONS.application_number; PUBLICATIONS.country_code; PUBLICATIONS.filing_date,4,lite_sql,sf_bq033
1268
  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 (
1269
  SELECT ST_GeogPoint(-87.6847, 41.8319) AS center,
1270
  50 AS maxdist_km
 
1494
  genex.""HGNC_gene_symbol"" IN ('MDM2', 'TP53', 'CDKN1A','CCNE1')
1495
  ORDER BY
1496
  ""case_barcode"",
1497
+ ""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
1498
  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
1499
  (
1500
  SELECT
 
1841
  OR cpc.""group_id"" = 'A01G'
1842
  ) AS filterData
1843
  ON app.""patent_id"" = filterData.""patent_id""
1844
+ 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
1845
  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
1846
  c.fall_color,
1847
  SUM(d.count_growth) AS change
 
1983
  INNER JOIN coinjoins
1984
  ON totals.tx_month = coinjoins.cjs_month
1985
  ORDER BY value_percent DESC
1986
+ 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
1987
  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 (
1988
  SELECT station_id
1989
  FROM
 
2360
  AND (b.""tissue_type"" = 'normal' OR b.""tissue_type"" = 'tumor')
2361
  AND (c.""item_name"" = 'Embedding medium' AND c.""item_value"" = 'Tissue freezing medium')
2362
  ORDER BY
2363
+ 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
2364
  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 (
2365
  SELECT CAST(""Code"" AS INT) AS CODE
2366
  FROM DEATH.DEATH.RACE
 
2416
  WHERE ""Age"" BETWEEN 12 AND 18
2417
  GROUP BY ""Age""
2418
  ) g
2419
+ 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
2420
  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 (
2421
  SELECT geo_id, unemployed_pop AS unemployed_2018
2422
  FROM `bigquery-public-data.census_bureau_acs.county_2018_5yr`
 
2829
 
2830
  SELECT filing_year
2831
  FROM
2832
+ MaxYearForTopAssignee",PUBLICATIONS.application_number; PUBLICATIONS.assignee_harmonized; PUBLICATIONS.cpc; PUBLICATIONS.filing_date,4,lite_sql,sf_bq091
2833
  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 (
2834
  -- Debits
2835
  SELECT
 
3207
  rn = 1
3208
  ORDER BY
3209
  ""rank""
3210
+ 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
3211
  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
3212
  (
3213
  SELECT
 
3801
  LEFT JOIN cit ON fam.""family_id"" = cit.""family_id""
3802
  LEFT JOIN gpr ON fam.""family_id"" = gpr.""family_id""
3803
  WHERE
3804
+ 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
3805
  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
3806
  patent.""title"",
3807
  patent.""abstract"",
 
3869
  ON app.""patent_id"" = filterData.""patent_id""
3870
  WHERE
3871
  TRY_CAST(app.""date"" AS DATE) < '2014-02-01'
3872
+ 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
3873
  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 (
3874
  SELECT
3875
  b.state_name,
 
4196
  ""mean_sq_between"" / ""mean_sq_within"" AS ""F""
4197
  FROM
4198
  numerator,
4199
+ 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
4200
  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
4201
  barcodes AS (
4202
  SELECT bcr_patient_barcode AS ParticipantBarcode
 
4746
  ""UpvotesReceived"" AS ""UpvotesReceivedByUpvotedUser"",
4747
  ""UpvotesGiven"" AS ""UpvotesGivenByUpvotedUser""
4748
  FROM ReciprocalUpvotes
4749
+ ORDER BY ""UpvotesReceived"" DESC, ""UpvotesGiven"" DESC;",FORUMMESSAGEVOTES.FromUserId; FORUMMESSAGEVOTES.Id; FORUMMESSAGEVOTES.ToUserId; USERS.Id; USERS.UserName,5,lite_sql,sf_bq167
4750
  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 (
4751
  SELECT
4752
  drug_name AS drug_name,
 
4921
  ""count""
4922
  FROM count_data
4923
  WHERE ""count"" >= 5
4924
+ AND ""type"" = 'PullRequestEvent';",LANGUAGES.language; LANGUAGES.repo_name; _20_*.created_at; _20_*.repo; _20_*.type,5,lite_sql,sf_bq182
4925
  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
4926
  AVG(TIMESTAMP_DIFF(dropoff_datetime, pickup_datetime, SECOND) / 60.0) AS average_trip_duration_in_minutes
4927
  FROM
 
5264
  FROM
5265
  forward_citation
5266
  WHERE
5267
+ ""forward_citations"" = 1;",PUBLICATIONS.application_number; PUBLICATIONS.citation; PUBLICATIONS.filing_date; PUBLICATIONS.grant_date; PUBLICATIONS.publication_number,5,lite_sql,sf_bq209
5268
  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 (
5269
  SELECT
5270
  t1.""publication_number"" AS publication_number,
 
5290
 
5291
  SELECT COUNT(nb_indep_claims)
5292
  FROM Publication_data
5293
+ WHERE nb_indep_claims != 0",PUBLICATIONS.claims_localized; PUBLICATIONS.country_code; PUBLICATIONS.grant_date; PUBLICATIONS.publication_number,4,lite_sql,sf_bq210
5294
  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(
5295
  SELECT
5296
  t1.""publication_number"",
 
5503
  middle_info
5504
  ORDER BY
5505
  ""category_corr_across_months""
5506
+ LIMIT 1;",SALES.category; SALES.category_name; SALES.date; SALES.volume_sold_gallons,4,lite_sql,sf_bq219
5507
  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 (
5508
  SELECT
5509
  cd.""parents"",
 
5651
  JOIN ""PATENTS"".""PATENTS"".""CPC_DEFINITION"" c ON ""cpc_group"" = c.""symbol""
5652
  WHERE c.""level"" = 4
5653
  GROUP BY c.""titleFull"", ""cpc_group""
5654
+ 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
5655
  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
5656
  REPLACE(citing_assignee, '""', '') AS citing_assignee,
5657
  cpcdef.""titleFull"" AS cpc_title,
 
5686
  refs.cited_assignee = 'DENSO CORP'
5687
  AND pubs.citing_assignee != 'DENSO CORP'
5688
  GROUP BY
5689
+ 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
5690
  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 (
5691
  SELECT
5692
  ""repo_name"",
 
5744
  watch_counts AS wc ON ar.""repo_name"" = wc.""repo""
5745
  ORDER BY
5746
  (fc.""forks"" + ic.""issue_events"" + wc.""watches"") DESC
5747
+ LIMIT 1;",LICENSES.license; LICENSES.repo_name; _20_*.actor; _20_*.repo; _20_*.type,5,lite_sql,sf_bq224
5748
  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 (
5749
  SELECT minor_category
5750
  FROM `bigquery-public-data.london_crime.crime_by_lsoa`
 
6140
  ) AS filterData
6141
  ON app.""patent_id"" = filterData.""patent_id""
6142
  ORDER BY filterData.""bkwdCitations_3"" DESC
6143
+ LIMIT 1;",APPLICATION.country; APPLICATION.date; APPLICATION.patent_id; CPC_CURRENT.patent_id; USPATENTCITATION.date; USPATENTCITATION.patent_id,6,lite_sql,sf_bq246
6144
  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 (
6145
  SELECT
6146
  D.""id"",
 
6198
  SELECT
6199
  (SELECT COUNT(*) FROM requests WHERE ""content"" LIKE '%Copyright (c)%') / COUNT(*) AS ""proportion""
6200
  FROM
6201
+ 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
6202
  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 (
6203
  SELECT 'Singapore' AS value
6204
  ),
 
6261
  CROSS JOIN population p
6262
  GROUP BY distance
6263
  ORDER BY distance DESC
6264
+ 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
6265
  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 (
6266
  SELECT
6267
  f.""id"",
 
6290
  NOT c.""binary""
6291
  AND f.""path"" LIKE '%.swift'
6292
  ORDER BY c.""copies"" DESC
6293
+ 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
6294
  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 (
6295
  SELECT ""geometry"" AS geometry
6296
  FROM GEO_OPENSTREETMAP.GEO_OPENSTREETMAP.PLANET_FEATURES,
 
6351
  AND baf.""feature_type"" = 'points'
6352
  GROUP BY pww.name
6353
  ORDER BY COUNT(baf.""osm_id"") DESC
6354
+ LIMIT 2",PLANET_FEATURES.all_tags; PLANET_FEATURES.feature_type; PLANET_FEATURES.geometry; PLANET_FEATURES.osm_id,4,lite_sql,sf_bq254
6355
  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
6356
  COUNT(commits_table.""message"") AS ""num_messages""
6357
  FROM (
 
6647
  kite
6648
  ORDER BY
6649
  ""avg_order_value"" DESC
6650
+ 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
6651
  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
6652
 
6653
  visit AS (
 
6891
  AND current_month.""delivery_month"" = DATEADD(MONTH, -1, previous_month.""delivery_month"") -- Correctly join to previous month
6892
  WHERE current_month.""delivery_month"" >= '2022-08-01' -- Only show August and later data, but use July for calculation
6893
  ORDER BY ""profit_vs_prior_month"" DESC
6894
+ 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
6895
  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
6896
  visit AS (
6897
  SELECT fullvisitorid, MIN(date) AS date_first_visit
 
7419
  daily_forecasts
7420
  ORDER BY
7421
  ""creation_time"",
7422
+ ""forecast_date"";",NOAA_GFS0P25.creation_time; NOAA_GFS0P25.forecast; NOAA_GFS0P25.geography,3,lite_sql,sf_bq291
7423
  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
7424
  ""trip_id"",
7425
  ""duration_sec"",
 
8433
  ""segmentation_category""
8434
  ORDER BY
8435
  ""count_"" DESC
8436
+ 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
8437
  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 (
8438
  SELECT
8439
  ""dicom_all_mr"".""SOPInstanceUID"",
 
8527
  ""osm_id""
8528
  FROM closest_to_median
8529
  ORDER BY diff_from_median
8530
+ 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
8531
  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
8532
  my_drug_list ARRAY<STRING>;
8533
  SET
 
8726
  AND DATE_TRUNC('DAY', TO_TIMESTAMP_NTZ(TO_NUMBER(""TRI"".""starttime"") / 1000000)) = DATE '2015-07-15'
8727
  ORDER BY
8728
  ""WEA"".""temp"" DESC, ""ZIPSTART"".""zip_code"" ASC, ""ZIPEND"".""zip_code"" DESC
8729
+ 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
8730
  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 (
8731
  SELECT
8732
  t2.""repo_name"",
 
9020
  GROUP BY
9021
  ""package_name""
9022
  ORDER BY
9023
+ ""count"" DESC;",SAMPLE_CONTENTS.content; SAMPLE_CONTENTS.id,2,lite_sql,sf_bq377
9024
  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 (
9025
  SELECT
9026
  AVG(associations.score) AS avg_score
 
9220
  JOIN
9221
  ""seg_studies""
9222
  ON
9223
+ ""mr_studies"".""StudyInstanceUID"" = ""seg_studies"".""StudyInstanceUID"";",DICOM_ALL.Modality; DICOM_ALL.SOPInstanceUID; DICOM_ALL.StudyInstanceUID; SEGMENTATIONS.SOPInstanceUID,4,lite_sql,sf_bq390
9224
  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
9225
  # FIRST CAST EACH YEAR, MONTH, DATE TO STRINGS
9226
  T AS (
 
10043
  'Top 3 by Max Exposure' AS ""MetricGroup"",
10044
  AVG(""seriesSizeInMB"") AS ""AverageSeriesSizeInMB""
10045
  FROM
10046
+ 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
10047
  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
10048
  id.country_name,
10049
  --cs.region,
 
10220
  base_census
10221
  ORDER BY
10222
  ""avg_median_income_diff"" DESC
10223
+ LIMIT 5;",ZIP_CODES.state_name; ZIP_CODES.zip_code,2,lite_sql,sf_bq429
10224
  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
10225
  -- *,
10226
  greatest(heavy_atoms_1, heavy_atoms_2) as heavy_atoms_greatest,
 
10382
  FROM parsed_burn_logs
10383
 
10384
  ORDER BY block_timestamp
10385
+ 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
10386
  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 *
10387
  FROM (
10388
  SELECT
 
10715
  geometryChecks
10716
  ORDER BY
10717
  geometryChecks.""seriesSizeInMiB"" DESC
10718
+ 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
10719
  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
10720
  Params AS (
10721
  SELECT 'Google Navy Speckled Tee' AS selected_product
 
10752
  AND items.item_name != selected_product
10753
  GROUP BY 1
10754
  ORDER BY item_quantity DESC
10755
+ LIMIT 1;",events_*.event_name; events_*.items; events_*.user_pseudo_id,3,lite_sql,sf_ga001
10756
  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
10757
  Params AS (
10758
  SELECT 'Google Red Speckled Tee' AS selected_product
 
11534
  SELECT RFM_Bucket,
11535
  AVG(total_spent / total_orders) AS avg_sales_per_customer
11536
  FROM RFM
11537
+ 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
11538
  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 (
11539
  SELECT
11540
  customer_unique_id,
 
11713
  FROM
11714
  Rank1
11715
  ORDER BY match_duration
11716
+ 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
11717
  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
11718
  WITH player_runs AS (
11719
  SELECT
 
11885
  ORDER BY
11886
  SUM(CAST((julianday(rental.return_date) - julianday(rental.rental_date)) * 24 AS INTEGER)) DESC
11887
  LIMIT
11888
+ 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
11889
  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 (
11890
  SELECT
11891
  dp.segment,
 
12193
  JOIN
12194
  product_abandoned AS t4
12195
  ON
12196
+ 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
12197
  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 (
12198
  SELECT
12199
  t1.month_year,