Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is a sub query?how will you calculate working days in
a month using sub query?

Answers were Sorted based on User's Feedback



what is a sub query?how will you calculate working days in a month using sub query?..

Answer / ankur akash

A query inside a query is a sub query.
The first query depends for its execution based on the
result provided by the execution of inside query. i.e. subquery.
For ex.
Select last_name, salary, job_id
from employees
where salary >(select last_name, salary
from employees
where last_name = 'Higgins');

Here
Select last_name, salary, job_id
from employees
where salary >
talks about the first query depending for its result based
on the execution of the inner query i.e. sub query
(select last_name, salary
from employees
where last_name = 'Higgins');

Is This Answer Correct ?    5 Yes 0 No

what is a sub query?how will you calculate working days in a month using sub query?..

Answer / thiyagarajan

A subquery is a select statement within another select
statement.subquery is executed only once and the parent or
outer query will always depends on the value returned by it.

Is This Answer Correct ?    3 Yes 0 No

what is a sub query?how will you calculate working days in a month using sub query?..

Answer / mohana sundaram

to extract data from single table or multiple tables

Is This Answer Correct ?    2 Yes 0 No

what is a sub query?how will you calculate working days in a month using sub query?..

Answer / p.rajasekar

ex
1)Method
Table tab1 data like Followings

Month date1 Working
Jan 1 0
Jan 1 1
Jan 1 1
Jan 1 0
.
.
.

Then the query should be

select Month,count(Working) from monthname m where working=1
group by Month,working

You will get answer 2;
2 Method

If we store the working days in same column

eg like(1=>Denotes Working,0=>denotes off)
Month Day1
Jan 101010101111



select Month,length(trim(replace(b.Day1,'0','')))
NoofWorkDays from workdays b


Please test it.Let me know the feed back

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More SQL PLSQL Interview Questions

How do you rank data in sql?

0 Answers  


i want run a sql query query? which phases are run in a back ground? pls tell me the answer

1 Answers  


Is it possible to sort a column using a column alias?

0 Answers  


what is denormalization. : Sql dba

0 Answers  


What is user in sql?

0 Answers  


What is the use of cursor ? how cursor allocate context area for executing the sql statement?

4 Answers   HCL,


what is 'mysqldump'? : Sql dba

0 Answers  


How delete all data from table in sql?

0 Answers  


How can get second highest salary in sql?

0 Answers  


how to select alphabets in a one column , for this the table name is PA_TASKS and column name is TASK_NUMBER, In TASK_NUMBER the data like this 1.1.3NN,1.1.4NN,1.5.1NN,1.3.2NE,1.5NN,1NN,1.2NE,1CE , For this i need to disply output as NN,NN,NN,NE,NN,NN,NE,CE, Its some urgent requirement ,thanks in advance

6 Answers  


Name some usages of database trigger?

0 Answers  


How can u find column name from a table which have max value in a row.( not max value)

5 Answers  


Categories