Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Pro 2
create table sailors(id int, name char(10), rating int, age int); create table reserve(id int,bid int, day char(10)); create table boats(bid int, bname char(10), colour char(10)); insert into sailors(id,name,rating,age) values(1,'A', 2, 19); insert into sailors(id,name,rating,age) values(2,'B', 3, 28); insert into sailors(id,name,rating,age) values(3,'C', 5, 37); insert into reserve(id, bid, day) values(1,101,'17-12-2019'); insert into reserve(id, bid, day) values(2,104,'21-12-2019'); insert into boats(bid, bname, colour) values(101,'R','Blue'); insert into boats(bid, bname, colour) values(104,'K','Red'); select s.rating, avg(S.age) from sailors S group by S.rating having count (*) > 1 select s.rating, avg(S.age) from sailors S where s.age>=18 group by s.rating having count (*) > 1
run
|
edit
|
history
|
help
0
Gatoactual
Task_5_Final
Use the right tool to get identity values back after an insert
tableA
Demo here
Doc
Libros
2021-03-06_LeetCodeSQL
Microsoft SQL Server T-SQL in 10 mn ~ Lesson 13 Subqueries vers. #5
STDEV vs STDEVP