Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
41 views

I am using PostgreSQL 18.0 and I have written a function with default parameters which inserts movie into the table. However, when I add the argument which must be added, it gives error: SQL Error [...
Beliz Yazici's user avatar
0 votes
1 answer
60 views

I'm trying to calculate the percentage contribution of each firm to the total amount across all firms. Database: google-bigquery What I need (desired output): Sum usde_haircut_amt per firm Compute ...
sandesh kamera's user avatar
-2 votes
0 answers
75 views

I have a case where I need to filter for the partial date string from a column. Here is the input: date_value ----------------------------- 7-03 start 4444 03/2022 follow up 1111 7-03 03/2022 ...
Hari's user avatar
  • 15
0 votes
1 answer
74 views

I have a DolphinDB table with an array vector column. I need to remove duplicate rows based on subset relationships within that column. Sample Input: sym prices a [3,4,5,6] a [3,4,5] a [2,4,5,6] a [5,...
xinyu zhang's user avatar
0 votes
1 answer
24 views

AWS documentation for querying Redshift's super is very much all in on supers that are arrays. But, I happen to want a super that is a map, as I'm sure a number of people do, and I would like to then ...
dlamblin's user avatar
  • 45.6k
1 vote
3 answers
78 views

I have an employee Manager table where you can see for every deptID, there are multiple rows. A few rows have null employeename and a few rows have null managername for same DeptID. i would like to ...
unicorn's user avatar
  • 590
-2 votes
1 answer
107 views

For example, I have this table below, how can I display only the records that aren't in the 10 minutes range. In this example should return the first and last in note examples user_id | ...
Luis's user avatar
  • 2,711
-2 votes
2 answers
70 views

I am trying to find an Oracle SQL to test whether a table (CONTACTS) contains two rows of data for each primary key (PK) called REF_NO. The table has a PK called REF_NO and a second PK called CONT_IND....
Sean Whiting's user avatar
0 votes
1 answer
125 views

SELECT tt.trans_type_name AS transaction_type, trans.transaction_time, a.trans_action_name AS transaction_action_name, trans.transaction_notes FROM(SELECT Cast(...
Thomas A Mathew's user avatar
1 vote
1 answer
74 views

I have the following SQL to create a materialized view and the SQL seems reasonable to me but it's unclear from Postgres docs what should happen in this case. I am listing the columns when creating ...
Byofuel's user avatar
  • 448
1 vote
1 answer
112 views

I have a table test with two columns, each referencing the other ID1 ID2 2 1 3 2 4 3 5 4 Given an id, I need to traverse the chain to return all the rows traversing the chain. Below is the query I ...
sg2000's user avatar
  • 325
Advice
2 votes
7 replies
101 views

I am trying to take the output of a SQL query and split it evenly into 3 HTML columns such as flexbox divs. Obviously the output total won't always be evenly divisible by 3 and the first 2 totals ...
Larry Moss's user avatar
0 votes
1 answer
72 views

I’m working on a data quality workflow where I validate incoming records for null or missing values. Even when a column clearly contains nulls, my rule doesn’t trigger and the record passes validation....
Neha Upadhyay's user avatar
2 votes
1 answer
115 views

I have this table in SQL: CREATE TABLE myt ( name VARCHAR(20), country VARCHAR(20), date_arrived DATE, date_left DATE ); INSERT INTO myt (name, country, date_arrived, date_left) ...
stats_noob's user avatar
  • 6,845
3 votes
1 answer
92 views

I'm trying to help a user in another stackoverflow question and have bumped by head into a strange behaviour. As I rarely use MariaDB, I'm opening another question to investigate the behaviour, ...
MatBailie's user avatar
  • 87.4k
3 votes
3 answers
129 views

I have a SQL table in postgres 14 that looks something like this: f_key data1 data2 fit 1 {'a1', 'a2'} null 3 1 {'b1', 'b2'} {'b3'} 2 2 {'c1', 'c2'} null 3 Note that data1 and data2 are arrays. I need ...
fitek's user avatar
  • 303