[Show all top banners]

subav
Replies to this thread:

More by subav
What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 Lau barbaaaad
[VIEWED 5693 TIMES]
SAVE! for ease of future access.
Posted on 10-18-10 7:11 AM     [Snapshot: 78]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Since i dont see anyone helping, i will try. mero sql ni teti ramro chaina :)

1:

SELECT FNAME, LNAME
FROM
EMPLOYEE
WHERE 
SALARY > (SELECT MIN(SALARY) FROM EMPLOYEE)

2:

Sorry saathi.. aru help garla ki??



 
Posted on 10-18-10 10:56 AM     [Snapshot: 266]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

First off, I learned sql on my own 8 yrs back and never used it so my memory is not fresh.
Second, if you cannot do this simple problem then forget about graduating with good gpa, and don't blame it on USA when u don't get a job after graduating. Alikati ta afai padhnu payo ni som.

Select fname, lname
From employee
Where salary>( (select min(salary) from employee)+10000);

2. Select fname, lname
From employee
Where dno=(select dno from employee where salary=(select max(salary) from employee));
 
Posted on 10-18-10 11:29 AM     [Snapshot: 290]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Stiffler's query is ok for 2 for the given data. But if there are multiple employees (whether in the same department or different departments) that earn the same salary that happen to be the highest for the company, then the query will return an error.


Following query should handle that situation.


Select fname, lname
From employee
Where dno in (select distinct dno from employee where salary=(select max(salary) from employee));


Or you could use this.


Select e.fname, e.lname
From employee e inner join


(select distinct dno from employee


   where salary=(select max(salary) from employee)


) m
on e.dno = m.dno


 


 


 


 
Posted on 10-18-10 11:33 AM     [Snapshot: 294]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Napadheko hoina bro...


Ma aafaile try gari sake ani answer lekhe tara ali sure bhayena...


Feri prof lastai kadha question sodhcha exam ma...ani grade dherai lyaune bhanekai assignment bata ho..


So make sure gareko..


Anyway Thanks hai duitai sathi haru!


 


 
Posted on 10-18-10 12:44 PM     [Snapshot: 391]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Not a problem. I am not not criticizing you, merely cautioning u that u need to master these things and go beyond the homeworks if u want to be hired after graduation. Agree with yotabhayenanisom.
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 200 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
ChatSansar.com Naya Nepal Chat
Toilet paper or water?
TPS EAD auto extended to June 2025 or just TPS?
Biden out, Trump next president, so what’s gonna happen to TPS, termination?
and it begins - on Day 1 Trump will begin operations to deport millions of undocumented immigrants
मन भित्र को पत्रै पत्र!
Tourist Visa - Seeking Suggestions and Guidance
From Trump “I will revoke TPS, and deport them back to their country.”
Anybody gotten the TPS EAD extension alert notice (i797) thing? online or via post?
advanced parole
TPS Renewal Reregistration
Sajha Poll: Who is your favorite Nepali actress?
Biden said he will issue new Employment visa for someone with college degree and job offers
Why Americans reverse park?
Nepali Passport Renew
Driver license help ASAP sathiharu
They are openly permitting undocumented immigrants to participate in federal elections in Arizona now.
ढ्याउ गर्दा दसैँको खसी गनाउच
To Sajha admin
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters