Skip to content

Tag: sql

ROW type/constructor in BigQuery

Does BigQuery have the concept of a ROW, for example, similar to MySQL or Postgres or Oracle or Snowflake? I know it sort of implicitly uses it when doing an INSERT … VALUES (…) , for example: Each of the values would be implicitly be a ROW type of the Inventory table, but is this construction all…

Extract all records from a JSON column, using JSON type

I have a couple tables (see reproducible code at the bottom): tbl1_have tbl2_have I wish to extract all json columns without providing explicit data type conversion for each columns since in my use case the names and amounts of nested attributes vary. The expected output is the same for both cases: tbl_want w…

Need help by populating a PrimeReact Tree

I’m trying to populate a PrimeReact Tree with data from sqlite3 database, but it doesnt work. Here is my SQL-Query: I get following JSON-Code: This is OK but i figured out, that the children are not rendered, because there are quotes around the square brackets at the children path – how can i fix …

SQL cummulative sum by group

I am struggling in finding a solution to create a cumulative sum by group in SQL. I have a table which have different events. What I want to accomplish is to sum the duration time of an event. What I need is a cumulative sum that gives me the total duration of Event1 as column besides ‘Event1_Start&#821…