Tutorium 6 select statements
This commit is contained in:
29
Tutorium_6_NoSQL Select
Normal file
29
Tutorium_6_NoSQL Select
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
SELECT *
|
||||||
|
FROM "IDBS01_Q12025"."json_parser"
|
||||||
|
;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Glosterm is missing in the 2nd row
|
||||||
|
--
|
||||||
|
SELECT
|
||||||
|
jsonb_extract_path_text(glossary, 'glossary', 'title') AS glossary_title,
|
||||||
|
jsonb_extract_path_text(glossary, 'glossary', 'GlossDiv', 'title') AS glossdiv_title,
|
||||||
|
jsonb_extract_path_text(glossary, 'glossary', 'GlossDiv', 'GlossList', 'GlossEntry', 'ID') AS glossentry_id,
|
||||||
|
jsonb_extract_path_text(glossary, 'glossary', 'GlossDiv', 'GlossList', 'GlossEntry', 'GlossTerm') AS glossentry_term,
|
||||||
|
jsonb_extract_path_text(glossary, 'glossary', 'GlossDiv', 'GlossList', 'GlossEntry', 'GlossDef', 'para') AS glossdef_para
|
||||||
|
FROM
|
||||||
|
"IDBS01_Q12025"."json_parser";
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- pdf files https://base64.guru/converter/decode/image
|
||||||
|
--
|
||||||
|
|
||||||
|
SELECT *
|
||||||
|
FROM "IDBS01_Q12025"."pdf_files"
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT encode(file_data, 'base64') AS base64_pdf
|
||||||
|
FROM "IDBS01_Q12025"."pdf_files"
|
||||||
|
WHERE file_name = 'Quittung.pdf'
|
||||||
|
;
|
||||||
Reference in New Issue
Block a user