aboutsummaryrefslogtreecommitdiffstats
path: root/extra/elasticsearch
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-07-01 16:34:13 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-07-01 16:34:13 -0700
commit274da5d3994e9f1a4ddabf2d3ddba06c5db1aa73 (patch)
tree3c048977f9701d132ecad404a7734b77927b9f04 /extra/elasticsearch
parent7ed9ae436813e1b8e275a1d43ab2ea6f05a429f4 (diff)
downloadfatcat-274da5d3994e9f1a4ddabf2d3ddba06c5db1aa73.tar.gz
fatcat-274da5d3994e9f1a4ddabf2d3ddba06c5db1aa73.zip
commit example of an elasticsearch SQL query
Diffstat (limited to 'extra/elasticsearch')
-rw-r--r--extra/elasticsearch/sql_queries.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/extra/elasticsearch/sql_queries.md b/extra/elasticsearch/sql_queries.md
new file mode 100644
index 00000000..3ea168e5
--- /dev/null
+++ b/extra/elasticsearch/sql_queries.md
@@ -0,0 +1,8 @@
+
+Top missing OA journals by `container_id`:
+
+ POST _xpack/sql?format=txt
+ {
+ "query": "SELECT container_id, count(*) from fatcat_release WHERE preservation = 'none' AND is_oa = true GROUP BY container_id ORDER BY count(*) DESC LIMIT 20"
+ }
+