Skip to content

Commit

Permalink
SQL Tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
astechedu committed Feb 21, 2024
1 parent efcbaa0 commit 8d8544e
Show file tree
Hide file tree
Showing 2 changed files with 891 additions and 0 deletions.
32 changes: 32 additions & 0 deletions sqlphp/developer-notes/databases/subqueries.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<<< SQL Subqueries <<<<<



-------------------------------------------------------------------
-------------------------------------------------------------------
Keys:
-------------------------------------------------------------------
-------------------------------------------------------------------

//Subqueries:
https://youtu.be/vz62aKmNpFQ?t=454

-------------------------------------------------------------------
-------------------------------------------------------------------


-----> Subqueries <-----

max(), min() and avg():

select *from student where fee=(select max(fee) from student);
select *from student where fee=(select min(fee) from student);
select *from student where fee>=(select avg(fee) from student);


select * from student where reg_no=(select reg_no from marks total=(select max(total) from marks));


-------------------------------------------------------------------
-------------------------------------------------------------------
-------------------------------------------------------------------
Loading

0 comments on commit 8d8544e

Please sign in to comment.