Revision 29759
Added by Eri Katsari over 10 years ago
modules/dnet-openaire-stats/trunk/src/main/resources/eu/dnetlib/data/mapreduce/hbase/statsExport/stats_db_schema.sql | ||
---|---|---|
116 | 116 |
INSERT INTO "shadow".defaults VALUES ('organization', 'country', 'number', 'count', '', 'column', 3); |
117 | 117 |
INSERT INTO "shadow".defaults VALUES ('datasource', 'oa_compatible', 'number', 'count', '', 'column', 4); |
118 | 118 |
|
119 |
CREATE OR REPLACE VIEW shadow.project_pub_count AS |
|
120 |
SELECT count(*) AS count, project_results_publication.project_results, project_results_publication.daysfromend |
|
121 |
FROM shadow.project_results_publication |
|
122 |
GROUP BY project_results_publication.project_results, project_results_publication.daysfromend; |
|
123 |
|
|
124 | 119 |
|
125 | 120 |
--set daysfromend |
126 | 121 |
UPDATE "shadow"."project_results" SET daysfromend = |
... | ... | |
144 | 139 |
FROM "shadow".project_results, "shadow".result where "shadow".project_results.result="shadow".result.id and "shadow".result.type='publication'; |
145 | 140 |
|
146 | 141 |
|
142 |
CREATE OR REPLACE VIEW shadow.project_pub_count AS |
|
143 |
SELECT count(*) AS count, project_results_publication.project_results, project_results_publication.daysfromend |
|
144 |
FROM shadow.project_results_publication |
|
145 |
GROUP BY project_results_publication.project_results, project_results_publication.daysfromend; |
|
146 |
|
|
147 | 147 |
|
148 | 148 |
--HAS PUBS |
149 | 149 |
UPDATE "shadow"."project" SET haspubs='yes' WHERE project_results in (select project_results from shadow.project_results_publication ); |
Also available in: Unified diff