Answered step by step
Verified Expert Solution
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started