mettastar Posted February 24, 2016 Report Posted February 24, 2016 vuncle .. 1 - tasty , 2 - average , 3 - bokaklaundi . prioritize seyal .. 1 main priority ... lekapothe 2 .. then 2 lekapothe 3 . .. bye1 pmed chusko..
Walcommon Posted February 24, 2016 Report Posted February 24, 2016 select siken, mutton, keema, MIN(goat_curry) from (select siken, mutton, keema, CASE WHEN goat = 'Average' then 1 when goat = 'Tasty' then 2 when goat = 'Bokkalaundi' then 3 END goat_curry from biskit,cream_biskit, salt_bisket where blah = blah and bluh = bluh) group by siken, mutton, keema; esonti query run sesse .. oke record ravali nak matram rendu ossunay .. fix etla seyal seppandi kasta .. primary key ento cheppuu.. e scenarios lo distinct records kavali?? specific ga cheppu requirment..
nenu_devudni Posted February 24, 2016 Author Report Posted February 24, 2016 paina query try cheyi bro painadi query pani chesinay unclce ... kani combination test chesi septay ...
loveindia Posted February 24, 2016 Report Posted February 24, 2016 MIN vadite 2 vastunnayi ante, you're getting 2 same values dude. hack solution: inner select lo distinct padeyyi. performance slow avuddi kani, work avuddi never use DISTINCT man.. it is wrong way to use distinct to remove a duplicate in your data.. instead you can use group by to do the same man... if you still think its fine, upto you man...
loveindia Posted February 24, 2016 Report Posted February 24, 2016 give the table structure and a couple of records and ask the output man... it will be much easier that way... this way it is just a guessing game...
4Vikram Posted February 24, 2016 Report Posted February 24, 2016 etla unai thatha nu .. pelli petakul lev neku .. epudu aina ma uri ki osse seppa rad .. sandrakala endi dan akkai degara kuda podam .. bye1 Ella 10giru aa maa vorla kenche kotha vorlo vachi thipal padthunai...
andhravodu Posted February 24, 2016 Report Posted February 24, 2016 never use DISTINCT man.. it is wrong way to use distinct to remove a duplicate in your data.. instead you can use group by to do the same man... if you still think its fine, upto you man... nenu distinct vadanu man, analytical functions only ikkada. ee babu req meeda clarity lenappudu, inner lo duplicate rows vastunnayemo ani distinct vadamanna. hack solution ani cheppaga appude
loveindia Posted February 24, 2016 Report Posted February 24, 2016 Ella 10giru aa maa vorla kenche kotha vorlo vachi thipal padthunai...
loveindia Posted February 24, 2016 Report Posted February 24, 2016 nenu distinct vadanu man, analytical functions only ikkada. ee babu req meeda clarity lenappudu, inner lo duplicate rows vastunnayemo ani distinct vadamanna. hack solution ani cheppaga appude telisi tappu cheyamani cheppadam tappu man...
nenu_devudni Posted February 24, 2016 Author Report Posted February 24, 2016 give the table structure and a couple of records and ask the output man... it will be much easier that way... this way it is just a guessing game... metta vuncle chepinatu below query worked .. i have tried a couple of ways but this one works just fine .. with GoatCurry as (select siken, mutton, keema, CASE WHEN goat = 'Average' then 1 when goat = 'Tasty' then 2 when goat = 'Bokkalaundi' then 3 END goat_curry from biskit,cream_biskit, salt_bisket where blah = blah and bluh = bluh) select siken, mutton, keema, goat_curry from GoatCurry where goat_curry = (select min(goat_curry) from GoatCurry )
andhravodu Posted February 24, 2016 Report Posted February 24, 2016 give the table structure and a couple of records and ask the output man... it will be much easier that way... this way it is just a guessing game... akkada vastundi a, b, c, 1 d, e, f, 2 he wants a, b, c, 1. min vadite adi vastundi anukunnadu, kani min group chesi, bringing both rows. column 4 lo 1,2 vachinappudu 1 ravali. 2,3 vachinapudu 2 ravali simple answer ga outer query sort chesi, rownum <= 1 petti icha, adi work ayiddi
andhravodu Posted February 24, 2016 Report Posted February 24, 2016 telisi tappu cheyamani cheppadam tappu man... ee morality clauses endi adhyaksha? time ki mobile lo gif kooda ledu
loveindia Posted February 24, 2016 Report Posted February 24, 2016 ee morality clauses endi adhyaksha? time ki mobile lo gif kooda ledu naaku coding standards follow avadam istam man, rest I dont care...
nenu_devudni Posted February 24, 2016 Author Report Posted February 24, 2016 naaku coding standards follow avadam istam man, rest I dont care... idisey uncle bye1 .. standards follow avali ante mundu coding sariga ravali kada
nenu_devudni Posted February 24, 2016 Author Report Posted February 24, 2016 Ella 10giru aa maa vorla kenche kotha vorlo vachi thipal padthunai...
Recommended Posts