I want to fill NULL values in device column for each session_id with an associated non-NULL value. How can I achieve that? Here is the sample data: +————+——-+———+ | session_id | step …
I want to fill NULL values in device column for each session_id with an associated non-NULL value. How can I achieve that? Here is the sample data: +————+——-+———+ | session_id | step …
I’ve seen a lot of questions about this error, the closest one (as it’s using window function) to my issue would be this one My issue is that I use columns in the windows function that are not …
I am currently converting an ArrayList to a String to send it to a DB so I can retrieve it on the other end and convert it back to an ArrayList later. My thought process is to convert it to a string …
I have the below query which is outputting the below results: SELECT a, b, COUNT(1) count, round(RATIO_TO_REPORT(COUNT(1)) OVER() * 100, 2) perc FROM t1 WHERE condition1 GROUP …
I have the below table C1 C2 C3 A1 A2 A3 B1 B2 B3 C1 C2 C3 C1 C4 C3 For each unique combination of C1 and C3, I would like to keep the first value in C2, but storing the count of unique elements …
There is a table tab1: |creation_date | acc_num | status| |——————-|———————|——-| |31.03.2021 07:43:43| 11111111111111111111| deny | |31.03.2021 07:43:43| …
I have a database with tables for equipment we service (table e, field e_id) contracts on the equipment (table c, fields c_id, e_id, c_start, c_end) maintenance we have performed in the past (table m,…
In the select, I get rows from the table with time in the format TIMESTAMP. I want to count unique rows, BUT with a possible error of 1 second. In the example below, for example, 3 unique records (1 …
I’m trying to insert values id_team_FK and id_location_FK which both come from the same table. For example id_team_FK = 4 and id_location_FK = 150. The problem is, id_team_FK must be a randomly chosen …
My request is quiet simple however I can’t find it (maybe I can’t goolge correctly). I have Table A and Table B Table A: ID length 1 50 2 45 2 20 and Table B ID name 1 apple 2 orange I want …