You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* define schema employee,
here employee can contain any number of attributes,
but it has to at least contain integer attributes
eid and age */
schema customer(id:int, name:text, city:text);
schema account(num:int, branch:text, custid:int, balance:int);
-- define table uw_emp using schema s1
table accs(account);
-- define table uw_sal using schema s1
table custs(customer);
-- define query q1 over uw_emp and uw_payroll
query q1
`select c.id, c.name
from accs a, custs c
where c.id=a.custid
and balance = (select max(al.balance) from accs as al)
group by c.id, c.name`;
-- define query q2 likewise
query q2
`select distinct c.id, c.name
from accs a, custs c
where c.id=a.custid
and balance = (select max(al.balance) from accs as al)
`;
verify q1 q2; -- does q1 equal to q2?
Input example:
Which causes the following error output:
Problematic line:
and balance = (select max(al.balance) from accs as al)
It should be:
and a.balance = [..]
The text was updated successfully, but these errors were encountered: