Commit 8bc1c3e2 authored by Haoyu Z's avatar Haoyu Z
Browse files

add submissions

parents 6c5fb135 46270576
select address.phone from (select a.phone as phone, a.address_id as address_id from (select c.address_id as address_id from rental as r join customer as c on r.customer_id = c.customer_id and r.staff_id = 1) as first join address as a on first.address_id = a.address_id and a.city_id > 500) as second join address on second.address_id = address.address_id;
select a.phone from (select c.address_id as address_id from rental as r join customer as c on r.customer_id = c.customer_id and r.staff_id = 1) as first join address as a on first.address_id = a.address_id and a.city_id > 500;
select film.title from film where film.rating = 'PG-13';
select film.title from (select i.film_id as fid from inventory as i join rental as r on i.inventory_id = r.inventory_id) as first join film on first.fid = film.film_id and film.rating = 'PG-13';
select film.film_id from film join film_category on film.rating = 'PG-13' and film_category.category_id = 1;
select film_category.film_id from (select film.film_id as fid from (select i.film_id as fid from inventory as i join rental as r on i.inventory_id = r.inventory_id) as first join film on first.fid = film.film_id and film.rating = 'PG-13') as second join film_category on second.fid = film_category.film_id and film_category.category_id = 1;
select student.name from student join regu on student.name = regu.name;
select student.name from student join (select regu.name as name from student join regu on student.name = regu.name) as r on student.name = r.name;
This diff is collapsed.
select student.name from student join regu on student.name = regu.name;
provenance formula | name | provsql-token
(student.t0 ⊗ regu.t0) ⊕ (student.t0 ⊗ regu.t1) | jhon | 56e383af-e2ac-5a52-92ab-7370c17640c3
(student.t1 ⊗ regu.t2) | mike | 3e797daf-16cf-5838-ab57-8841440acbcb
(student.t2 ⊗ regu.t3) ⊕ (student.t2 ⊗ regu.t4) | jack | 01fb5a43-37f8-513a-a1b7-fecfa594dbc0
(student.t0 ⊗ regu.t0) ⊕ (student.t0 ⊗ regu.t1) | jhon | 3afdc964-6167-5a0c-8b1d-02ed436a04bb
(student.t1 ⊗ regu.t2) | mike | f3cbb468-8995-5517-a81f-76f3a3c98380
(student.t2 ⊗ regu.t3) ⊕ (student.t2 ⊗ regu.t4) | jack | 2f95e10b-c2ba-5713-a6b9-ff8d05d7cfe1
---------------------------
select student.name from student join (select name from regu) as r on student.name = r.name;
select student.name from student join (select regu.name as name from student join regu on student.name = regu.name) as r on student.name = r.name;
provenance formula | name | provsql-token
(student.t0 ⊗ regu.t0) ⊕ (student.t0 ⊗ regu.t1) | jhon | 89319d33-35f6-56b5-957e-4df6427881fb
(student.t1 ⊗ regu.t2) | mike | b3f6b565-e18a-5d1c-aa3c-b56d845d8da4
(student.t2 ⊗ regu.t3) ⊕ (student.t2 ⊗ regu.t4) | jack | 674ab765-5f7b-559b-85fc-a18313fdaa76
(student.t0 ⊗ (student.t0 ⊗ regu.t0)) ⊕ (student.t0 ⊗ (student.t0 ⊗ regu.t1)) | jhon | 2c0982a0-4fe3-5782-8c55-a3b8caa91ae0
(student.t1 ⊗ (student.t1 ⊗ regu.t2)) | mike | 2b1d0c80-0a99-5926-a129-b08f4d1b9e6c
(student.t2 ⊗ (student.t2 ⊗ regu.t3)) ⊕ (student.t2 ⊗ (student.t2 ⊗ regu.t4)) | jack | 161b552d-f691-51e4-949e-3b962576f3b9
---------------------------
......@@ -7,4 +7,4 @@ psql test < ../config/func.sql
git pull
python3 ../src/provenance.py -q ../config/test_query.in -o test_output.txt ../config/test_config.txt
python3 ../src/provenance.py -q ../config/subquery.in -o test_output.txt ../config/test_config.txt
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment