android-coloring-app
Let Me Craft is an android application which is based on theme of Hack and Craft. Along with you can color the beautiful images.
- 10
- Java
- 5 y ago
SQL tutorial for beginners from freecodecamp YT.
Repo rahulhgdev/SQL-from-freecodecamp, read from GitHub 4 h ago. rahulhgdev has not joined Take My Repo.
rahulhgdev/SQL-from-freecodecamp is a public repo on GitHub by rahulhgdev. SQL tutorial for beginners from freecodecamp YT. It declares the MIT license on GitHub. It has 1 stars and last changed on 2022-07-07. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-22.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
SQL tutorial for beginners from freecodecamp YT(YouTube).
Youtube Tutorial Link(freeCodeCamp) - https://www.youtube.com/watch?v=HXV3zeQKqGY
SQL tutorial for beginners from freecodecamp YT.
Any collection of related information -
1. Phone Book
2. Shopping list
3. Todo list
4. Your 5 best friends
5. Facebook's user base, etc..
Database can be stored in different ways -
1. On paper
2. In your mind
3. On a computer
4. This Notion note on SQL itself
5. Comment section, etc..
Relational databases (SQL)
Non-Relational (no-SQL / not just SQL)



All tables in Relational Databases we have 2 things Rows & Columns




- One table can have more than one foreign key.
- In below table super_id (supervisor id) is also a foreign key that links employee table itself. (eg. Jan Levinson is supervisor of Michael Scott & Josh Porter)
Composite Key - Composite key is a candidate key that consists of two or more attributes(table columns) that together identify an entity occurrence(table row).


You can use SQL to get the RDBMS to do things for you
SQL implementations vary between systems
SQL is usually a hybrid language, it's basically 4 types of language in one
Data Query Language (DQL)
Data Definition Language (DDL)
Data Control Language (DCL)
Data Manipulation Language (DML)
A query is a set of instructions given to the RDBMS (written is SQL) that tell the RDBMS what information you want it to retrieve for you
SELECT employee.name, employee.age
FROM employee
WHERE employee.salary > 300000;

show databases;

CREATE TABLE student(
student_id INT PRIMARY KEY,
names VARCHAR(20),
major VARCHAR(20)
-- PRIMARY KEY(student_id) // comment in SQL
);
Syntax: DESCRIBE tableName;
DESCRIBE student;
Syntax: DROP Table tableName;
DROP TABLE student;
Grab all the information from the table.
Syntax: SELECT * FROM table_name;
SELECT * FROM student;
Syntax: ALTER Table tableName ADD column_name datatype( ); (Suppose we want to add cgpa column)
ALTER TABLE student ADD cgpa DECIMAL(3,2);
ALTER TABLE student DROP COLUMN cgpa;
Suppose you want to change the column name:
Syntax: ALTER TABLE TableName CHANGE oldColumnName newColumnName datatype();
Syntax: INSERT INTO tab_name VALUES();
INSERT INTO student VALUES(1, 'Jack', 'Biology');
INSERT INTO student VALUES(2, 'Kate', 'Sociology');
Rows affected 1 (You'll see this message after inserting above information)
Suppose a student don't have major then we can modify our INSERT Statement as follow:
INSERT INTO student(student_id, name) VALUES(3, 'Claire');
Now If we see the Claire's major, then it'll show NULL
CREATE TABLE student(
student_id INT,
names VARCHAR(20) NOT NULL, -- i.e. you cannot insert for **name** column
major VARCHAR(20) UNIQUE, -- i.e. major coloumn must be unique for each row in this table
PRIMARY KEY(student_id) // comment in SQL
);
SELECT * FROM student;
INSERT INTO student VALUES(1, 'Jack', 'Biology');
INSERT INTO student VALUES(2, 'Kate', 'Sociology');
INSERT INTO student VALUES(3, NULL, 'Chemistry'); -- it'll throw error as we've mentioned that name van't be NULL
INSERT INTO student VALUES(4, 'Jack', 'Biology'); -- it'll throw error - **Duplicate entry 'Biology' for key 'major'** as we've mentioned major column must be Unique for each row
INSERT INTO student VALUES(5, 'Mike', 'Computer Science');
CREATE TABLE student(
student_id INT,
names VARCHAR(20) ,
major VARCHAR(20) DEFAULT 'undecided',
PRIMARY KEY(student_id)
);
SELECT * FROM student;
INSERT INTO student(student_id, name) VALUES(1, 'Jack'); -- i.e now if you'll see Jack's major for student_id:1, it'll show **undecided**
INSERT INTO student VALUES(2, 'Kate', 'Sociology');
INSERT INTO student VALUES(3, 'Claire', 'Chemistry');
INSERT INTO student VALUES(4, 'Jack', 'Biology');
INSERT INTO student VALUES(5, 'Mike', 'Computer Science');
CREATE TABLE student(
student_id INT AUTO_INCREMENT,
names VARCHAR(20),
major VARCHAR(20),
PRIMARY KEY(student_id)
);
SELECT * FROM student;
INSERT INTO student(name, major) VALUES('Jack', 'Biology');
INSERT INTO student(name, major) VALUES('Claire', 'Chemistry');
INSERT INTO student(name, major) VALUES('Jack', 'Biology');
INSERT INTO student(name, major) VALUES('Mike', 'Computer Science');
> you'll see auto-increment of student-id
SELECT * FROM student;
UPDATE student
SET major = 'Bio';
SELECT * FROM student;
UPDATE student
SET major = 'Bio'
WHERE major = 'biology';
-- OR
UPDATE student
SET major = 'Comp Sci.'
WHERE major = 'Computer Science';
SELECT * FROM student;
UPDATE student
SET major = 'Bio'
WHERE student_id = 4;
SELECT * FROM student;
UPDATE student
SET major = 'Bio'
WHERE major = 'biology';
-- OR
UPDATE student
SET major = 'Comp Sci.'
WHERE major = 'Computer Science';

SELECT * FROM student;
UPDATE student
SET major = 'Bio'
WHERE student_id = 4;
SELECT * FROM student;
UPDATE student
SET major = 'Biochemistry'
WHERE major = 'bio' OR major = 'chemistry';

SELECT * FROM student;
UPDATE student
SET name = 'Tom', major = 'undecided'
WHERE student_id = 1;
SELECT * FROM student;
DELETE FROM student;
SELECT * FROM student;
DELETE FROM student
WHERE student_id = 5;
SELECT * FROM student;
DELETE FROM student
WHERE name = 'Tom' AND major = 'undecided'
SELECT name, major FROM student;
-- OR (If we have many tables then,)
SELECT student.name, student.major
FROM student;
SELECT student.name, student.major
FROM student
ORDER BY name;
-- DESCENDING ORDER
SELECT *
FROM student
ORDER BY student_id DESC;
-- ASCENDING ORDER
SELECT *
FROM student
ORDER BY student_id ASC;
SELECT *
FROM student
ORDER BY major, student_id;
5.1. Suppose you want to grab all information from table in alphabetical order of major and student_id (in descending order):
SELECT *
FROM student
ORDER BY major, student_id DESC;
SELECT *
FROM student
LIMIT 2;
6.1. Suppose you want to grab all information till 2 rows and also by descending order of student_id:
SELECT *
FROM student
ORDER BY student_id DESC
LIMIT 2;
SELECT name, major
FROM student
WHERE major = 'Chemistry' OR major = 'Biology';
SELECT name, major
FROM student
WHERE major <> 'Chemistry';
SELECT *
FROM student
WHERE student_id < 3;
SELECT *
FROM student
WHERE student_id < 3 AND name <> 'Jack';
SELECT *
FROM student
WHERE name IN ('Claire','Kate','Mike');
SELECT *
FROM student
WHERE major IN ('Biology', 'Chemistry') AND student_id > 2;

CREATE TABLE employee (
emp_id INT PRIMARY KEY,
first_name VARCHAR(40),
last_name VARCHAR(40),
bith_day DATE,
sex VARCHAR(1),
salary INT,
super_id INT,
branch_id INT
);
CREATE TABLE branch (
branch_id INT PRIMARY KEY,
branch_name VARCHAR(40),
mgr_id INT,
mgr_start_date DATE,
FOREIGN KEY(mgr_id) REFERENCES employee(emp_id) ON DELETE SET NULL
);
ALTER TABLE employee
ADD FOREIGN KEY(branch_id)
REFERENCES branch(branch_id)
ON DELETE SET NULL;
ALTER TABLE employee
ADD FOREIGN KEY(super_id),
REFERENCES employee(emp_id)
ON DELETE SET NULL;
CREATE TABLE client (
client_id INT PRIMARY KEY,
client_name VARCHAR (40),
branch_id VARCHAR(40),
FOREIGN KEY (branch_id) REFERENCES branch(branch_id) ON DELETE SET NULL;
);
CREATE TABLE client (
client_id INT PRIMARY KEY,
client_name VARCHAR (40),
branch_id VARCHAR(40),
FOREIGN KEY (branch_id) REFERENCES branch(branch_id) ON DELETE SET NULL;
);
CREATE TABLE branch_supplier (
branch_id INT,
supplier_name VARCHAR(40),
supply_type VARCHAR(40),
FOREIGN KEY(branch_id, supplier_name), // supplier_name is not foreign key but it is composite key
FOREIGN KEY (branch_id) REFERENCES branch(branch_id) ON DELETE CASCADE;
);
-- Corporate
INSERT INTO employee VALUES(100, 'David', 'Wallace', '1967-11-17', 'M',250000,ES9 NULL, NULL);
// We've set branch_id as NULL because corporate branch have not been creaated yet
// So, we're inserting values into branch table
INSERT INTO branch VALUES(1, 'Corporate', 100, '2006-02-09');
UPDATE employee
SET branch_id = 1
WHERE emp_id = 100;
// Now, inserting last row in employee table
INSERT INTO employee VALUES(101,'Jan','Levinson','1961-05-11','F',110000,100,1);
-- Scranton
INSERT INTO employee VALUES(102,'Michael','Scott','1964-03-15','M',75000, 100, NULL);
// We've set branch_id as NULL because corporate branch have not been creaated yet
// So, we're inserting values into branch table
INSERT INTO branch VALUES(2, 'Scranton', 102, '1971-06-25');
UPDATE employee
SET branch_id = 2
WHERE emp_id = 102;
INSERT INTO employee VALUES(103,'Angela','Martin','1971-06-25','F',63000, 102, 2);
INSERT INTO employee VALUES(104,'Kelly','Kappoor','1980-02-05','F',55000, 102, 2);
INSERT INTO employee VALUES(105,'Stanley','Hudson','1958-02-19','M',69000, 102, 2);
-- Stamford
INSERT INTO employee VALUES(106,'Josh','Porter','1969-09-05','M',78000,100, NULL);
// We've set branch_id as NULL because corporate branch have not been creaated yet
// So, we're inserting values into branch table
INSERT INTO branch VALUES(3,'Stanford',106,'1998-02-13');
UPDATE employee
SET branch_id = 3
WHERE emp_id = 106;
INSERT INTO employee VALUES(107, 'Andy', 'Bernard', '1973-07-22', 'M', 65000, 106, 3);
INSERT IN TO employee VALUES(108, 'Jim', 'Halpert', '1978-10-01', 'M', 71000, 106, 3);
-- BRANCH_SUPPLIER
INSERT INTO branch_supplier VALUES(2, 'Hammer Mill', 'Paper');
INSERT INTO branch_supplier VALUES(2, 'Uni-Ball', 'Writing Materials');
INSERT INTO branch_supplier VALUES(3, 'Patriot Paper & Labels', 'Paper');
INSERT INTO branch_supplier VALUES(2, 'J.T. Forms ', 'Custom Forms');
INSERT INTO branch_supplier VALUES(3, 'Uni-Ball', 'Writing Utensils');
INSERT INTO branch_supplier VALUES(3, 'Hammer Mill', 'Paper');
INSERT INTO branch_supplier VALUES(3, 'Stamford Labels', 'Custom Forms');
-- CLIENT
INSERT INTO client VALUES(400, 'Dunmore Hishchool',2);
INSERT INTO client VALUES(401, 'Lackwana Country',2);
INSERT INTO client VALUES(402, 'FedEx',3);
INSERT INTO client VALUES(403, 'John Dally Law, LLC',3);
INSERT INTO client VALUES(404, 'Scrantin Whitepapers',2);
INSERT INTO client VALUES(405, 'Times Newspaper',3);
INSERT INTO client VALUES(406, 'FedEx',2);
-- WORKS_WITH
INSERT INTO works_with VALUES(105, 400, 55000);
INSERT INTO works_with VALUES(102, 401, 267000);
INSERT INTO works_with VALUES(108, 402, 22500);
INSERT INTO works_with VALUES(107, 403, 5000);
INSERT INTO works_with VALUES(108, 403, 12000);
INSERT INTO works_with VALUES(105, 404, 33000);
INSERT INTO works_with VALUES(107, 405, 26000);
INSERT INTO works_with VALUES(102, 406, 150000);
INSERT INTO works_with VALUES(105, 406, 130000);
-- Employee table
Select * from employee;
-- Branch table
Select * from branch;
-- Client table
Select * from client;
-- Works_With table
Select * from works_with;
-- Branch Supplier table
Select * from branch_supplier;
-- Find all employees
SELECT * FROM EMPLOYEE;
-- Find all clients
SELECT * FROM client;
-- Find all employees order by salary
SELECT *
FROM employee
ORDER BY salary;
-- Find all employees order by salary in descending order
SELECT *
FROM employee
ORDER BY salary desc;
-- Find all employee ordered by sex then name
SELECT *
FROM employee
ORDER BY sex, first_name, last_name;
-- Find first 5 employee in the table
SELECT *
FROM employee
LIMIT 5;
--- Find the first and last names of all employees
SELECT first_name, last_name
FROM employee;
--- Find the forename and surnames of all employees
SELECT first_name AS forename, last_name AS surname
FROM employee;
-- Find out all different genders
SELECT DISTINCT sex
FROM employee;
-- Find out all different branches
SELECT DISTINCT branch_id
FROM employee;
-- Find the number of employee
SELECT COUNT(emp_id)
FROM employee; // output as 9 (It also counts null)
// or
SELECT COUNT(super_id)
FROM empoyee; // output as 8 (It won't count null)
-- Find the number of female employees born after 1970
SELECT COUNT(emp_id)
FROM employee
WHERE sex = 'F' AND birth_date > '1971-01-01';
-- Find the average of all employee's salary
SELECT AVG(salary)
FROM employee;
-- Find the average of Male's salary
SELECT AVG(salary)
FROM employee
WHERE sex = 'M';
-- Find the sum of all employee's salary
SELECT SUM(salary)
FROM employee;
-- Find out how many males and females there are
SELECT COUNT(sex), sex
FROM employee
GROUP BY sex;
-- Find the total sales of each salesman
SELECT SUM(total_sales), emp_id
FROM works_with
GROUP BY emp_id;
-- Find the total money spent by each client
SELECT COUNT(total_sales), client_id
FROM works_with
GROUP BY client_id;
LIKE operator is used in a WHERE clause to search for a specified pattern in a column.-- % = any # characters,
-- _ = one character
-- Find any client's who are an LLC
SELECT *
FROM client
WHERE client_name LIKE '%LLC';
-- Find any branch suppliers who are in the label busines
SELECT *
FROM branch_supplier
WHERE supplier_name LIKE '% Label%;
-- Find any employee born in october
SELECT *
FROM employee
WHERE birth_date LIKE '____-10'; // YEAR-10
-- Find any employee born in october
SELECT *
FROM employee
WHERE birth_date LIKE '____-02';
-- Find a list of employee, client name and branch names in single column
SELECT first_name AS Company_Names
FROM employee
UNION
SELECT branch_name
FROM branch;
UNION
SELECT client_name
FROM client;
-- Find a list of all clients and branch suppliers's names
// as both table client and branch_supplier have branch_id
SELECT client_name, client.branch_id
FROM client
UNION
SELECT supplier_name, branch_supplier.branch_id
FROM branch_supplier;
-- Find a list of all money spent or earned by the company
SELECT salary
FROM employee
UNION
SELECT total_sales
FROM works_with;
-- To learning about we are inserting another branch into branch table
INSERT INTO branch VALUES(4, 'Buffalo', NULL, NULL);
**Join/ Inner Join
-- Find all branches and the names of their managers
// As emp_id and mgr_id both column are storing emp_id so we can use Join here
SELECT employee.emp_id, employee.first_name, branch.branch_name
FROM employee
JOIN branch
ON employee.emp_id = branch_mgr_id;
**Left Join
-- Find all branches and the names of their managers
// As emp_id and mgr_id both column are storing emp_id so we can use Join here
SELECT employee.emp_id, employee.first_name, branch.branch_name
FROM employee
LEFT JOIN branch
ON employee.emp_id = branch_mgr_id;
**Right Join
-- Find all branches and the names of their managers
// As emp_id and mgr_id both column are storing emp_id so we can use Join here
SELECT employee.emp_id, employee.first_name, branch.branch_name
FROM employee
RIGHT JOIN branch
ON employee.emp_id = branch_mgr_id;
rahulhgdev/SQL-from-freecodecamp is a public repo on GitHub by rahulhgdev. SQL tutorial for beginners from freecodecamp YT.
It declares the MIT license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2022-07-07. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.

Let Me Craft is an android application which is based on theme of Hack and Craft. Along with you can color the beautiful images.
Let's Call App is phone calling app. You just enter mobile number and click on Let's Call button to make phone call. It has very simple and attractive UI. :-)

Python tutorial for beginners. This repository includes all beginner level programs

QR Generator & Scanner is used to create QR codes of size 700x700. And also it have feature scanning of any QR code. :-)

Mine bitcoins with 15 lines of python code.

Learn data science for absolute beginners. This repository includes libraries like Numpy, Pandas, Matplotlib and more will be added soon.