how to find the First and Last Observation from the table:
Ex: OBS Name Sal Ans like: OBS Name Sal
105 E 5000--> 105 E 5000
102 B 2000 104 D 4000
103 C 3000
101 A 1000-->
104 D 4000
Answers were Sorted based on User's Feedback
Answer / shailesh jori
select * from table_name where rowid=(select min(rowid) from table_name) or rowid=(select max(rowid) from table_name)
Is This Answer Correct ? | 5 Yes | 3 No |
Answer / ajit
SELECT MIN(Obs)
FROM <Table_name>
UNION ALL
SELECT MAX(Obs)
from <Table_name>;
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / mahendar reddy
select *from t_name where rownum=1
union
(select *from t_name
intersect
select *from t_name where rowid=(select max(rowid)from t-name));
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / arjun
select * from tablename where rowid=1
union
( select * from tablename
intersect
select * from tablename where rowid = ( select max(rowid)
from tablename));
Is This Answer Correct ? | 0 Yes | 6 No |
i hv 30 rows with date.ex:1month hav 4 weeks i want 1st day of the every week.write the qry for that.example jan has 4 weeks i need 1st dd for evry wk
how can we optimize or increase the speed of a mysql select query? : Sql dba
Types of locks in database ?
Types of joins ?
Is sql between inclusive?
Is there a 64 bit version of ssms?
----> There is a table T with two columns C1 and C2. The data is as below: C1 C2 1 4 2 5 3 6
What is orm in sql?
Whate is use of MOD function in pl/sql.
Is postgresql a server?
What is a null value?
What are % type and % rowtype?