mirror of
https://github.com/robindhole/fundamentals.git
synced 2025-03-15 23:19:56 +00:00
Merge branch 'master' of github.com:kanmaytacker/fundamentals
This commit is contained in:
commit
a5754c9e70
@ -23,7 +23,7 @@ Download the ER diagram from [here](media/student-er.drawio) and import it into
|
||||
|
||||
### Problem sets
|
||||
1. [**Simple - I**](https://leetcode.com/problems/big-countries/)
|
||||
2. [Simple - II](https://leetcode.com/problems/find-customer-referee//)
|
||||
2. [Simple - II](https://leetcode.com/problems/find-customer-referee/)
|
||||
3. [**Joins - I**](https://leetcode.com/problems/employees-earning-more-than-their-managers/)
|
||||
4. [Joins - II](https://leetcode.com/problems/combine-two-tables/)
|
||||
5. [**Aggregation - I**](https://leetcode.com/problems/duplicate-emails/)
|
||||
|
@ -2,12 +2,12 @@
|
||||
# Queries
|
||||
|
||||
## Insert queries
|
||||
1. Insert a row with your name and all the other fields
|
||||
1. Insert a row with your name and all the other fields in **students** table
|
||||
```sql
|
||||
|
||||
```
|
||||
|
||||
1. Insert a row with just mandatory fields
|
||||
2. Insert a row with just mandatory fields in **students** table
|
||||
```sql
|
||||
|
||||
```
|
||||
@ -87,7 +87,7 @@
|
||||
```sql
|
||||
|
||||
```
|
||||
15. Get all students without the first name `John` or last name `Mycroft`
|
||||
15. Get all students without the first name `John` or first name `Mycroft`
|
||||
|
||||
```sql
|
||||
|
||||
@ -111,7 +111,7 @@
|
||||
```sql
|
||||
|
||||
```
|
||||
20. Get all students in Jhansi and London
|
||||
20. Get all students from Jhansi and London
|
||||
|
||||
```sql
|
||||
|
||||
@ -172,7 +172,7 @@
|
||||
|
||||
```
|
||||
|
||||
2. Delete a multiple rows
|
||||
2. Delete multiple rows
|
||||
|
||||
```sql
|
||||
|
||||
|
@ -211,5 +211,5 @@ For example, we want to get the batch names of all the students along with their
|
||||
This can be achieved by using the following SQL query:
|
||||
|
||||
```sql
|
||||
SELECT s.first_name, s.last_name, b.batch_name FROM students s JOIN batches ON s.batch_id = b.id;
|
||||
SELECT s.first_name, s.last_name, b.batch_name FROM students s JOIN batches b ON s.batch_id = b.id;
|
||||
```
|
@ -33,7 +33,7 @@ For example, we want to get the batch names of all the students along with their
|
||||
This can be achieved by using the following SQL query:
|
||||
|
||||
```sql
|
||||
SELECT s.first_name, s.last_name, b.batch_name FROM students s JOIN batches ON s.batch_id = b.id;
|
||||
SELECT s.first_name, s.last_name, b.batch_name FROM students s JOIN batches b ON s.batch_id = b.id;
|
||||
```
|
||||
|
||||
### Left Outer Join
|
||||
|
Loading…
x
Reference in New Issue
Block a user