-
Notifications
You must be signed in to change notification settings - Fork 0
/
people_rpt.sql
38 lines (37 loc) · 1.32 KB
/
people_rpt.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
select json_object(
'family_name', src->'family_name',
'given_name', src->'given_name',
'cl_people_id', ifnull(src->'clpid', ''),
'thesis_id', ifnull(src->'thesis_id', ''),
'advisor_id', ifnull(src->'advisors_id', ''),
'authors_id', ifnull(src->'authors_id', ''),
'archivesspace_id', ifnull(src->'archivesspace_id', ''),
'directory_id', ifnull(src->'directory_user_id', ''),
'viaf_id', src->'viaf',
'lcnaf', src->'lcnaf',
'isni', src->'isni',
'wikidata', src->'wikidata',
'snac', src->'snac',
'orcid', src->'orcid',
'image', '',
'educated_at', ifnull(src->'educated_at', ''),
'caltech', ifnull(src->'caltech', ''),
'jpl', ifnull(src->'jpl', ''),
'faculty', ifnull(src->'faculty', ''),
'staff', ifnull(src->'staff', ''),
'alumn', ifnull(src->'alumn', ''),
'status', ifnull(src->'status', ''),
'directory_person_type', ifnull(src->'directory_person_type', ''),
'title', ifnull(src->'title', ''),
'bio', ifnull(src->'bio', ''),
'division', ifnull(src->'division', ''),
'authors_count', '',
'thesis_count', '',
'data_count', '',
'advisor_count', '',
'editor_count', '',
'updated', src->'updated',
'include_in_feeds', ifnull(src->'include_in_feeds', '')
) as src
from people
order by src->'family_name', src->'given_name'