Skip to content

Commit b9e4d01

Browse files
initial migration modification to create users_view_with_multiple_refs_to_users
1 parent 243a982 commit b9e4d01

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/db/00-init.sql

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,21 @@ create table table_with_primary_key_other_than_id (
141141
create type composite_type_with_record_attribute as (
142142
todo todos
143143
);
144+
145+
create view users_view_with_multiple_refs_to_users as
146+
WITH initial_user AS (
147+
SELECT
148+
u.id as initial_id,
149+
u.name as initial_name
150+
FROM users u
151+
where u.id = 1
152+
),
153+
second_user AS (
154+
SELECT
155+
u.id as second_id,
156+
u.name as second_name
157+
FROM users u
158+
where u.id = 2
159+
)
160+
SELECT * from initial_user iu
161+
cross join second_user su;

0 commit comments

Comments
 (0)