Question: rewrite this query to make sure pick the TIE values 1. select Geo_QName, MAX(cast(ACS18_5yr_B15003025 as decimal)/ACS18_5yr_B15003001) as proportion from b15003 group by Geo_QName order by

rewrite this query to make sure pick the TIE values

1. select Geo_QName, MAX(cast(ACS18_5yr_B15003025 as decimal)/ACS18_5yr_B15003001) as proportion from b15003 group by Geo_QName order by proportion desc limit 1 ;

I do not need to use limit 1 , I want have TIE values if there will be one

2. SELECT Geo_STUSAB AS myState,

SUM(ACS18_5yr_B15003002)::NUMERIC/SUM(ACS18_5yr_B15003001)AS mySum

FROM b15003

GROUP BY Geo_STUSAB

ORDER BY mySum DESC

LIMIT 1;

do same for this query , no limit, just show MAX values if there is TIE or not

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!