I have below source table - TEST_TAB DP_AD_ACCT_NBR DP_AD_CCY_CDE DP_AD_CURR_BAL DP_AD_LST_MDFSN_DATE ...
I have below source table - TEST_TAB DP_AD_ACCT_NBR DP_AD_CCY_CDE DP_AD_CURR_BAL DP_AD_LST_MDFSN_DATE ...
I would like to query hierarchy results ordered by depth first without the use of SQL's heiarchyid built in function. Essentially, I am hoping to acco ...
I have a problem like this in SQL Server. Here is the base table: submission_date submission_id hacker_id score ...
I am trying to look at my database of administered table where we can see when a member has been administered and released from the rehab center. The ...
PostgreSQL 14 Assume I have the following table: Each patientid has multiple links. If I start with patientId of 1, the following will correctly e ...
I have only found this using a classic ParentID foreign key method. I wonder how to display full hierarchy path using the HierarchyID data type in SQL ...
Data I have a couple of tables like so: Desired Results For any given cycle, I want to count the number of occurrences of str across cycles. So b ...
I have a dataset with 3 columns: Item_id Sourced_from Cost 1 Local 15 2 ...
. Answers to this question are eligible for a +50 reputation bounty. th ...
I have a table called AccountNode. Where the the column nodeId has a parent in the ParentNodeId col. What i need : i need to get the parent node of ...
I have two tables DT and averages: I want the averages table to have the dates like that in the DT table i.e. I want the averages.workdate column t ...
I hope use Recursive CTE to find Total for all childrencount and parentcount and path and level and currentlevel like this I tried the following co ...
I have a table of events for a bunch of aggregates (order is one of them), that I can query like SELECT * FROM events WHERE aggregate_id = :order_id ...
In my project I have types Comment and CommentDto: Comment will be mapped into CommentDto. Here is the configuration: I have the following recur ...
I have this table named items with following columns and rows. I could measure the level of rows parent by recursive CTE, but I still need to get t ...
DB-Fiddle This is a simplification of the problem I'm facing. It boils down to a CTE that shows a list of products of the current and previous years. ...
I have a sql server table showing the IDs and their previous IDs, create table test2 ( ID varchar(10) , Pre_ID varchar(10) ) in ...
I am am building a Time Dimension table in PostgreSQL with DATE_ID and DATE_DESC. My T-SQL (works perfectly) script is: At the moment Im trying to ...
In the table below, how to insert rows with the first and last date of years between the START_DATE and END_DATE column? EMPID ...
My actual problem involves a larger row source and more involved math, but this is a small example that still exhibits the challenge faced. Using Orac ...