select x4, sum(x5)
from X, Y
where x1 = y2
and x2 = y3
and y1 between 100 and 500
group by x4;
select x4, sum(x5)
from X, Y
where y1 = x1
and y2 = x2
and y1 between 100 and 500
select x4, count(x5)
from X, Y
where x1 = y1
and x2 = y2
and y1 >= 100
and y1 <= 500
group by x4;
select x4, count(*)
from X, Y
where y2 = x1
and y3 = x2
and y1 between 101 and 501;
{TITLE}
{CONTENT}
{TITLE}
Aguarde, enviando solicitação...