Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

SQL Commands Cheat Sheet, Cheat Sheet of Database Management Systems (DBMS)

It is all about SQL commands. Which includes DDL and DML commands. Joins commands with easy understanding. It will cover all the basic commands of SQL.

Typology: Cheat Sheet

2021/2022

Uploaded on 12/18/2022

musab-pirzada
musab-pirzada 🇵🇰

2 documents

Partial preview of the text

Download SQL Commands Cheat Sheet and more Cheat Sheet Database Management Systems (DBMS) in PDF only on Docsity! runt Sie SQL-COMMANDS % & & § § 9 & = = calories_table a B: e |cal_per typ _per_g£ ismea SELECT DISTINCT (type) 8 @ m pall tunes “ : wrong : FROM fruits O = ’ wees ‘ : Seal?! fitype, tn Wy COUNT(name) AS amount pe in ay a). . c.cal_per_g @) FROM fruits =| c.cal_per_g * f.weight AS calories GROUP BY type | Acie tes (22 SELECT* [—1__ HAVING COUNT <3 " SELECT * 4 OY } . inane) LEFT JOIN calories_table AS c FROM fruits PRON fruits OR y | INNER, int ON f.type = c.type ORDER BY < : : weight DESC e ASC, eness DESC WITH fresh_stuff AS ( = SELECT * aoe FROM fruits DECLARE today DATE DEFAULT CURRENT_DATE(); ncaa aL SELECT name, type, we ight, ripeness SELECT 5 FROM fruits name, WHERE I ® CASE | ripeness < CURRENT_DATE() WHEN (ripeness < today) THEN ,,bad“ WHEN (ripeness = today) THEN ,,eat now" G) , Q END AS to_eat_or_not_to_eat & 4% SELECT weight AS weight\ in _g FROM fruits 4 YY CROTON] % mie
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved