Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
116 views

I would like to do some calculations with postgresql in a recursive / iterative way. Here is a very rudimentary example: There is a line and on the line are 2 points. I want to create new points in ...
lrahlff's user avatar
0 votes
1 answer
246 views

source link Hello guys, so i have a function ("flecheD"), (ColChild,ColParent,ParentActuel,source)=> let mylist=Table.Column(Table.SelectRows(...
Steph's user avatar
  • 3
0 votes
1 answer
824 views

Here is my ER diagram. If I know the user_id, how can I get a single user's user data=>projects=>boards=>posts using a single SQL query? I have found out about recursive CTE, but all of the ...
Jash1395's user avatar
  • 248
0 votes
1 answer
118 views

I always get the error Types don't match between the anchor and the recursive part in column "manager_name" of recursive query "manager". on the following query, even when ...
Pedro Paixao's user avatar
0 votes
1 answer
207 views

Something aparently as easy as the following query is driving me crazy, anyone can help? SELECT * FROM ( WITH recursive colores (id_modelo, cod_color, rango) AS ...
fina rodriguez's user avatar
0 votes
1 answer
82 views

I have a table like this: |id |name |parent| +-------+----------+------+ |1 |iran | | |2 |iraq | | |3 |tehran |1 | |4 |tehran |3 | |5 ...
user avatar
-1 votes
1 answer
58 views

I have a hierarchy table with a path enumeration column (lineage column) mytable: path desc lvl D Chicago 1 DADB Los Angeles 2 DADB761 Miami 3 DADB761G93 Detroit 4 DADB761G93276 San Francisco 5 ...
Ibo's user avatar
  • 4,319
0 votes
0 answers
97 views

I have a csv file which has 4 columns such as NEW_ID, OLD_ID, CLOSE_DATE_TXT, NEW_DATE_TXT. The NEW_ID will have its corresponding OLD_ID. The output should be, if the OLD_ID is same as NEW_ID then ...
Mr.Sappeswaran's user avatar
3 votes
3 answers
2k views

I have Categories stored in a single table. Where there is no limit on number of childerns. I want to fetch all the linked childern categories for the provided category id: The reason for getting the ...
StormTrooper's user avatar
  • 1,783
0 votes
1 answer
62 views

Suppose I have the following tree: The table that stores the data is presented below accordingly: node_id parent_id A null B A C A D B I want to select all node ancestors for every node in the tree. ...
Shalev Sror's user avatar
0 votes
1 answer
114 views

Given the following: CREATE TABLE example ( example_name varchar(50), example_parent varchar(50) ); insert into example (example_name, example_parent) values ('e1', NULL), ('e2', 'e1'), ('...
baxx's user avatar
  • 4,954
1 vote
1 answer
104 views

I want to get a list of employees who come under the given Head/Employee. It should return all sub-heads and their sub-head and employees under him/her. Following is the list of all Employees with ...
Teknas's user avatar
  • 559
1 vote
1 answer
545 views

I am trying to aggregate rows on a chain of pairs. For example, given table: pair0 | pair1 a z b a c b d b m n z y Returns: matches [a, z, b, c, d, y] [m, n] ...
clp2000's user avatar
  • 11
0 votes
1 answer
106 views

In SQLite how to fill in null for missing numbers from a range of 1-10 when using Group By? I have a table called DataTest: DataID theData 1 50 2 38 2 48 4 38 5 48 8 39 9 50 9 60 10 90 If I do SELECT ...
Marcos Vlachos's user avatar
1 vote
1 answer
165 views

I have started on a new job and my first task is to improve performance of code for which user action takes 40 mins currently sometimes. On analysis I found that there is a Parent - Child - ...
Akash Sharma's user avatar
0 votes
0 answers
114 views

I have the following query which works for Oracle and returns tree nodes depending on the input :NodeId and :Lvl parameters: SELECT Id AS TreeId, Parent AS ParentId, MY_ID AS EntityId, name as Name ...
kassfb's user avatar
  • 23
-1 votes
1 answer
80 views

How do I convert this connect by oracle sql query to Postgres recursive with? SELECT DISTINCT connect_by_root(po1.product_offer_name) AS Offer po.product_offer_id product_offer_id FROM ...
KONDETI AJAY KUMAR's user avatar
0 votes
0 answers
95 views

I have collection in which I have defined all my products and their sub-products. The sub-products are not defined as sub-documents but as a separate document in the collection. const ...
Mahesh's user avatar
  • 11
2 votes
2 answers
776 views

I have a table of this type | id | parent_id | | title | parent_id refers to the id of the same table I need to get a recursive tree for an element knowing only its parent. it will be clearer what I ...
Derks's user avatar
  • 31
1 vote
0 answers
107 views

I have 2 tables in a MariaDB Table 1 structure: ID (primary auto-increment) itemType(ENUM) and itemName(varchar) The ENUM has 4 possibilities - "heading","section","text",...
Russell Parrott's user avatar
1 vote
1 answer
665 views

I tried to find out the masterIds as Array. please find the below create temp table location as select 1 as id,'World' as name,null as main_id union all select 2,'Asia',1 union all select 3,'Africa',1 ...
Prasanna Kumar J's user avatar
1 vote
1 answer
240 views

I have this locations table: id type slug parent_location_id 1 Country Germany nil 2 FederalState Hessen 1 3 City Frankfurt 2 4 Street Example 3 I have a tags table which has a belongs_to logic to the ...
wintermeyer's user avatar
  • 8,346
4 votes
1 answer
2k views

I have this table of a hierarchy select * from product_categories; id | parent_id | item | rule ----+-----------+--------------+--------------- 1 | | ecomm | 2 | ...
Rahul's user avatar
  • 347
0 votes
1 answer
140 views

I Have a SQL Server database with a table named Balance The table: Id Date IN OUT Balance 3345312 2022-08-07 100 50 250 5435245 2022-08-06 50 50 200 4353451 2022-08-05 0 100 200 5762454 2022-08-04 20 ...
Henrique Teles Ribeiro's user avatar
-1 votes
1 answer
414 views

I am using HSQLDB 2.6.1, and I want to COUNT() the working table of a recursive CTE. I wrote the following test: with recursive nums (n, m) as ( select 1, 1 from (values(1)) union all ...
rapt's user avatar
  • 12.3k

1
3 4
5
6 7
43