Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

select d.State, d.avgWages, IF(d.avgWages = a.min, 'min', 'max') as type from (select Min(avgWages) min, Max(avgWages) max from Zipcode_info) as a, Zipcode_info d where d.avgWages =a.min

select d.State, d.avgWages, IF(d.avgWages = a.min, 'min', 'max') as type from (select Min(avgWages) min, Max(avgWages) max from Zipcode_info) as a, Zipcode_info d where d.avgWages =a.min or d.avgWages = a.max group by d.avgWages

I am trying to make a View but view does not allow to have subquery.

that is correct query but because of subquery, I cannot create a view.

how should I change it not having subquery?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions