Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
EXP 8 q2
create table emp(emp_no integer,emp_name varchar (30),salary integer,hiredate date); insert into emp values(1,'Jay',50000,'2012-09-25'),(2,'ashish',15000,'2003-07-22'),(3,'shreyas',30000,'2000-11-05'),(4,'priya',45000,'2010-04-15'),(7,'mona',35000,'2010-10-05'); select * from emp; create table dept(dept_no integer,emp_no integer ,deptname varchar(30),location varchar(30)); insert into dept values(11,1,'it','mumbai'),(10,3,'marketing','thane'),(15,4,'abc','kalyan'),(10,2,'marketing','nashik'); select * from dept; Select dept_no,min(salary)from emp e,dept d where e.emp_no=d.emp_no group by dept_no; Select dept_no,sum(salary)from emp e,dept d where e.emp_no=d.emp_no group by dept_no; Select dept_no from dept group by dept_no having count(emp_no)>1; Select * from emp e,dept d where e.emp_no=d.emp_no order by emp_name;
run
|
edit
|
history
|
help
0
Microsoft SQL Server T-SQL in 10mn ~ Lesson 15. Creating Advanced Joins samples...
sql test
SQL Stringdata
Teacher
DBMS ca2
20181CSE0534
SQL Directives Order of Execution
Window Funtions - RANK()
Performance test - select vs while - Get all days between two dates.
Object Attributed Mapping Interview Question