sqlfire - Why won't this statement work? SQL -


i using sqlfire. doing assignment , when beginning assignment came across couldn't return particular value. see sql fiddle, contains exact data in table using in assignment , contains sql statement have tried. fiddle: http://sqlfiddle.com/#!2/e761ac/1

what want outputted is:

rate | rentalcode ----------------- 350  |    wl 

i getting error when type code sql fire. error message

i have been told not use order clause , have not learnt 'limit'

thank you

you need have group by clause since have non-aggregated column in select clause

select min(rate), rentalcode rentalrates  group rentalcode 

update

since want lowest rate, think better way using order - limit since supports multiple records having lowest rate.

select * rentalrates rate = (select min(rate) rentalrates) 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -