Commit a38728c9 authored by haoyuz3's avatar haoyuz3
Browse files

debug

parent 6c423f2a
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 > 100) as second join address on second.address_id = address.address_id;
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';
This diff is collapsed.
......@@ -2,7 +2,7 @@
set "PGPASSWORD=m"
dropdb dvdrental
createdb dvdrental
pg_restore -U joker -d dvdrental /home/joker/sql-provenance/provsql/scripts
pg_restore -U joker -d dvdrental /home/joker/sql-provenance/provsql/scripts/dvdrental.tar
psql dvdrental < ../config/setup.sql
psql dvdrental < ../config/func.sql
......
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
---------------------------
select student.name from student join (select name from regu) 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
---------------------------
......@@ -7,4 +7,4 @@ psql test < ../config/func.sql
git pull
python3 ../src/provenance.py -q ../config/query.in -o output.txt ../config/config.txt
python3 ../src/provenance.py -q ../config/test_query.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