Example Queries and Results

The following are examples of valid Google BigQuery SQL queries that can be executed against the Dimensions Google BigQuery datasets.

Tip

For more query examples and Jupyter notebooks see also the Dimensions BigQuery Lab website and Github repository.

Simple Query

1
SELECT COUNT(*) AS total FROM `dimensions-ai.data_analytics.publications`

This query will return the total number of publications contained within the publications table.

Row

total

1

112,655,924

Retrieving Records

The query below will retrieve the top 5 records from the publications table which have the highest Altmetric Attention scores for the GRID ID grid.4991.5 in the year 2020. Returning the publication identifier, title of the publication, total number of authors as well as the Altmetric Attention score.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
SELECT
  id,
  title.preferred as title,
  ARRAY_LENGTH(authors) as authors,
  CAST(altmetrics.score as INT64) as altmetric_score
FROM
  `dimensions-ai.data_analytics.publications`
WHERE
  year = 2020 AND 'grid.4991.5' in UNNEST(research_orgs)
ORDER BY
  altmetrics.score desc
LIMIT 5

id

title

authors

altmetric_score

pub.1130340155

Two metres or one: what is the evidence for physical distancing in covid-19?

6

13396

pub.1127239818

Remdesivir in adults with severe COVID-19: a randomised, double-blind, placebo-controlled, multicentre trial

46

12693

pub.1126016857

Quantifying SARS-CoV-2 transmission suggests epidemic control with digital contact tracing

9

8330

pub.1130512923

Association Between Administration of Systemic Corticosteroids and Mortality Among Critically Ill Patients With COVID-19

38

5791

pub.1128699413

Effect of Dexamethasone in Hospitalized Patients with COVID-19: Preliminary Report

27

5709