Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions