I use the Greenplum database – massively multi-parallel Postgres. I have a table which that has 100 gb. There is data from 2019 up to today. The table is not ordered, but every day we insert new data. So it’s kinda sorted by a sales day. I would like to recreate this table, but I would like to sort the
Tag: greenplum
Hive trunc date format issues
I am trying to convert GP to Hive migration logic but below statement giving the wrong output while execute query: output for GP : 2021-12-31 similar if we converted Hive query out put if Hive query : 2022-01-02 i could see the difference of the date. please help me. Thanks Answer You are subtracting interval 0 months and 1 day
SQL error 42P01 when using jsonb_to_recordset function
I’m trying to display the contents of the jsonb column using the jsonb_to_recordset function: But get the following error The function itself works when I substitute the values manually. Сan’t figure out what the problem is. Answer Write it as a FROM…JOIN:
How to update a column based on values of other columns
I have a tables as below I have to update var_start_date column with min(reporting_date) for each combination of id,code,sub_code and item_nbr only till variance field is zero. Row with variance = 0 should have null var_start_date. and next row after that should have next min(var_start_date.). FYI, variance is calculated as par_cnt-orc_cnt so my output should look like this – I