From e0b8537e7bef19cb368bbd61a9eda24cd3705004 Mon Sep 17 00:00:00 2001 From: deepamaddala <91093325+deepamaddala@users.noreply.github.com> Date: Sat, 17 Sep 2022 13:10:57 +0000 Subject: [PATCH 1/8] New Tables -employees and departments and inserts --- database.db | Bin 0 -> 28672 bytes queries/create_dept_copy_tab.sql | 7 ++ queries/create_dept_table.sql | 8 ++ queries/create_emp_table.sql | 14 +++ queries/create_old_emp_table.sql | 11 +++ queries/insert_dept_table.sql | 162 +++++++++++++++++++++++++++++++ queries/insert_emp_table.sql | 44 +++++++++ queries/insert_old_emp_table.sql | 42 ++++++++ queries/select.sql | 1 + queries/selectAll.sql | 2 +- 10 files changed, 290 insertions(+), 1 deletion(-) create mode 100644 database.db create mode 100644 queries/create_dept_copy_tab.sql create mode 100644 queries/create_dept_table.sql create mode 100644 queries/create_emp_table.sql create mode 100644 queries/create_old_emp_table.sql create mode 100644 queries/insert_dept_table.sql create mode 100644 queries/insert_emp_table.sql create mode 100644 queries/insert_old_emp_table.sql create mode 100644 queries/select.sql diff --git a/database.db b/database.db new file mode 100644 index 0000000000000000000000000000000000000000..44b2523f96bc997806f02e3c2ec89ca8b1f12921 GIT binary patch literal 28672 zcmeI)e`p(3902gUm)xaE+k0Jqg&Er27+Vu;v}vu|1aVoGwy|kaFWI2&w(OQ%+qm>D zyCkLkL&mxxf&+2L(7zm55C{6#1pkl?QLz4kxjz(PiXaYu&VdtT{^R%FC2gbI{&J$@ z`{3?-dGCAo-uv9;;4ZYOC*t|CCQlpYoLZI#xE7A*xm~i%aoiv*E?8>C2^-c@D|~I^ z4snos;IS{7>F=EA`I?ii(f6BvmM%7)fe%hs7+JNPH}qSzdjd;o!R6hug+FPqQ5%I^ zMw=^IV_vr@){S^wgU2t+&^zp*8}@js>*}yst2OSrMtS|{W!)&tdZke4Wywz(hwF3e zlI@&1Raa*;b6uX@9h)&b%52`$aw0>Ztq=E3#z%e+5j7?d-wJS?3}DIHt-?;%QiDv@L& zl~%&BL|QH$sa>G*xDp!+D--f)bVByCYp{Cy)}>Fcre~@rY$&NjW5Wr1FS{;aUBpUs zD5^vgk!Z^PPQr=v*P3NdAm|jmVIR-s^_;d)I$D5d*^F8#8|-s!NSRReYzoKs@h)#y z7r%6jT>#dBR&NAQL+UPpTI=n;{{BJsCBGYY0PE(ljtg{agQ@4ON_YYf644v!x}8I9 z=S--!<$zmlgLS)YhQ%upj{Zn5(ev~b`W$_V&d|N|Q7Thjx+Z-lU6fvvUXYGSN2Mug zmlTlNAsq_}pa2S>01BW03ZMWApa2S>!2eF5#VZgWM|f#mT{MkCL0oR@6v$?%aVlEY ztmMmieMVgF=n%+Oj&L^>t*qt?a!M^|C2@IUyFh|aeSO%N*Gzp*)62D{_BMfRfu^gm zv^=5}iaD)xL|kra6-XP@UP&Y)(A5Uk6?YkOQk7!SFw0QcVppyti<-&al0ir9)IQpU zh@qEFHCr8(WRL1R)RxL-1*#2QT<&ZZNDp*!ZcNoH(~w*-*(5eJ38V|^&+gWAZ8~3u z<90O)WDu&(q-Ir9n}yeC@D3}bne+LqH9wz6AR%Zz#kw^La#+vF5qOW4hk@TXt(5cgT25T1PJ#ClGS0-g=iTq!=MeZHAw%Pp!-afSRS1+CA=pXbq`V0M@ zenY>cpVLq2hxA?gHhq)6L0_e3=}Yu9eU_etcLVd(fOIS# zvT(}7!jfBX@ccr9wbotMIwxA|Nx@o=JFWGQ!&>`^)4{vDo9QE5gY+T?&-|~`6Lf;M zNNKm`^QKmim$0Te(16hHwKKmim$0TlQb1bWp`00Dl~?C!7e!CsJwO zWN7D(P%zXV>>Fr&i|_63X>gN`UOVy7SS%ioDiK&leN&JKS)pM6fY8pZbZ>LHiMN`V z3GWGyrPlJc2m5veLj%q@x8mO>uH_v}jm6RG8IA`Co9+PNcfw(+6WE`M zB-82jGpKfG&0xsySj(JxJei25#vpY#s`w_@T>Bmh_VqWu%-`ttleNsrNIa~J{w4F_ zVBb#nY5s=4hX=k*9OIi9jU|T1m1ruqCz?pxd?2{J?HR{+e(U%D2KoU* z6}$3_EF2VBIN)YszmtV2 z2Md!#a1gg|!utDv_@{qZPyhu`00mG01yBG5Pyhu`00mG01@2)1eEz?OPcBXk1yBG5 WPyhu`00mG01yBG5Pyhw00)GOl)@@J# literal 0 HcmV?d00001 diff --git a/queries/create_dept_copy_tab.sql b/queries/create_dept_copy_tab.sql new file mode 100644 index 0000000..8eb1445 --- /dev/null +++ b/queries/create_dept_copy_tab.sql @@ -0,0 +1,7 @@ +CREATE TABLE dept_copy_tab +( + deptno NUMBER, + dname VARCHAR2(50), + mgr_id NUMBER(10), + location_id NUMBER(10) +); diff --git a/queries/create_dept_table.sql b/queries/create_dept_table.sql new file mode 100644 index 0000000..161df7f --- /dev/null +++ b/queries/create_dept_table.sql @@ -0,0 +1,8 @@ +CREATE TABLE dept_tab +( + deptno NUMBER(5), + dname VARCHAR2(50), + mgr_id NUMBER(10), + location_id NUMBER(10), + CONSTRAINT pk_dept_tab PRIMARY KEY (deptno) +); \ No newline at end of file diff --git a/queries/create_emp_table.sql b/queries/create_emp_table.sql new file mode 100644 index 0000000..b1e2047 --- /dev/null +++ b/queries/create_emp_table.sql @@ -0,0 +1,14 @@ +CREATE TABLE emp_tab +( + empno NUMBER, + name VARCHAR2(50) NOT NULL, + job VARCHAR2(50), + manager NUMBER(10), + hiredate DATE, + salary NUMBER(10,2), + commission NUMBER(10,2), + deptno NUMBER(5), + CONSTRAINT pk_emp_tab PRIMARY KEY (empno), + CONSTRAINT fk_emp_tab_deptno FOREIGN KEY (deptno) + REFERENCES dept_tab(deptno) +); \ No newline at end of file diff --git a/queries/create_old_emp_table.sql b/queries/create_old_emp_table.sql new file mode 100644 index 0000000..a44ae24 --- /dev/null +++ b/queries/create_old_emp_table.sql @@ -0,0 +1,11 @@ +CREATE TABLE old_emp_tab +( + empno NUMBER, + name VARCHAR2(50) not null, + job VARCHAR2(50), + manager NUMBER(10), + hiredate DATE, + salary NUMBER(10,2), + commission NUMBER(10,2), + deptno NUMBER(5) +); \ No newline at end of file diff --git a/queries/insert_dept_table.sql b/queries/insert_dept_table.sql new file mode 100644 index 0000000..657bbb4 --- /dev/null +++ b/queries/insert_dept_table.sql @@ -0,0 +1,162 @@ +INSERT INTO dept_tab VALUES + ( 30 + , 'Purchasing' + , 114 + , 1700 + ); + + INSERT INTO dept_tab VALUES + ( 40 + , 'Human Resources' + , 203 + , 2400 + ); + + + + INSERT INTO dept_tab VALUES + ( 70 + , 'Public Relations' + , 204 + , 2700 + ); + + INSERT INTO dept_tab VALUES + ( 80 + , 'Sales' + , 145 + , 2500 + ); + + INSERT INTO dept_tab VALUES + ( 90 + , 'Executive' + , 100 + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 100 + , 'Finance' + , 108 + , 1700 + ); + + INSERT INTO dept_tab VALUES + ( 110 + , 'Accounting' + , 205 + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 120 + , 'Treasury' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 130 + , 'Corporate Tax' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 140 + , 'Control And Credit' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 150 + , 'Shareholder Services' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 160 + , 'Benefits' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 170 + , 'Manufacturing' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 180 + , 'Construction' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 190 + , 'Contracting' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 200 + , 'Operations' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 210 + , 'IT Support' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 220 + , 'NOC' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 230 + , 'IT Helpdesk' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 240 + , 'Government Sales' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 250 + , 'Retail Sales' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 260 + , 'Recruiting' + , NULL + , 1700 + ); + +INSERT INTO dept_tab VALUES + ( 270 + , 'Payroll' + , NULL + , 1700 + ); \ No newline at end of file diff --git a/queries/insert_emp_table.sql b/queries/insert_emp_table.sql new file mode 100644 index 0000000..0e224f7 --- /dev/null +++ b/queries/insert_emp_table.sql @@ -0,0 +1,44 @@ +INSERT INTO emp_tab +VALUES(7001, 'KING', 'PRESIDENT', null, + date('1981-11-17'), 5000, 1000, 40); + +INSERT INTO emp_tab +VALUES(7002, 'CLARK', 'MANAGER', 7001, + date('1981-06-09'), 2450, 500, 40 +); + +INSERT INTO emp_tab +VALUES(7003, 'JONES', 'MANAGER', 7001, + date('1981-04-02'),2975, 500, 30 +); + +INSERT INTO emp_tab + VALUES(7004, 'SCOTT', 'ANALYST', 7002, + date('1987-08-13'), 3000, 300, 70 +); + +INSERT INTO emp_tab +VALUES(7005, 'FORD', 'ANALYST', 7002, +date('1981-12-03'),3000, 300, 30 +); + +INSERT INTO emp_tab + VALUES(7006, 'SMITH', 'CLERK', 7003, + date('1980-12-17'),800, 200, 30 +); + +INSERT INTO emp_tab +VALUES(7007, 'ADAMS', 'CLERK', 7003, + date('1987-08-13'), 1100, 200, 40 +); + +INSERT INTO emp_tab +VALUES( + 7008, 'MILLER', 'CLERK', 7003, + date('1982-01-23'), 1300, 200, 30 +); + +DELETE FROM emp_tab WHERE empno=7005; + + + diff --git a/queries/insert_old_emp_table.sql b/queries/insert_old_emp_table.sql new file mode 100644 index 0000000..9f2071a --- /dev/null +++ b/queries/insert_old_emp_table.sql @@ -0,0 +1,42 @@ +INSERT INTO old_emp_tab +VALUES(7001, 'KING', 'PRESIDENT', null, + date('1981-11-17'), 5000, 1000, 40); + +INSERT INTO old_emp_tab +VALUES(7002, 'CLARK', 'MANAGER', 7001, + date('1981-06-09'), 2450, 500, 40 +); + +INSERT INTO old_emp_tab +VALUES(7003, 'JONES', 'MANAGER', 7001, + date('1981-04-02'),2975, 500, 30 +); + +INSERT INTO old_emp_tab + VALUES(7004, 'SCOTT', 'ANALYST', 7002, + date('1987-08-13'), 3000, 300, 70 +); + +INSERT INTO old_emp_tab +VALUES(7005, 'FORD', 'ANALYST', 7002, +date('1981-12-03'),3000, 300, 30 +); + +INSERT INTO old_emp_tab + VALUES(7006, 'SMITH', 'CLERK', 7003, + date('1980-12-17'),800, 200, 30 +); + +INSERT INTO old_emp_tab +VALUES(7007, 'ADAMS', 'CLERK', 7003, + date('1987-08-13'), 1100, 200, 40 +); + +INSERT INTO old_emp_tab +VALUES( + 7008, 'MILLER', 'CLERK', 7003, + date('1982-01-23'), 1300, 200, 30 +); + + + diff --git a/queries/select.sql b/queries/select.sql new file mode 100644 index 0000000..3ddae20 --- /dev/null +++ b/queries/select.sql @@ -0,0 +1 @@ +select * from dept_tab; \ No newline at end of file diff --git a/queries/selectAll.sql b/queries/selectAll.sql index e082d25..05c8bc0 100644 --- a/queries/selectAll.sql +++ b/queries/selectAll.sql @@ -1,2 +1,2 @@ -- SQLite -SELECT * FROM USER; \ No newline at end of file +SELECT * FROM emp_tab; \ No newline at end of file From 26a68b0d675ed3532993a75227d371734d8b9f86 Mon Sep 17 00:00:00 2001 From: deepamaddala <91093325+deepamaddala@users.noreply.github.com> Date: Sun, 18 Sep 2022 11:58:10 +0000 Subject: [PATCH 2/8] Added all the queries to a folder named 00_01 --- queries/{ => 00_01}/createTable.sql | 0 queries/{ => 00_01}/create_dept_copy_tab.sql | 0 queries/{ => 00_01}/create_dept_table.sql | 0 queries/{ => 00_01}/create_emp_table.sql | 0 queries/{ => 00_01}/create_old_emp_table.sql | 0 queries/{ => 00_01}/insert_dept_table.sql | 0 queries/{ => 00_01}/insert_emp_table.sql | 0 queries/{ => 00_01}/insert_old_emp_table.sql | 0 queries/{ => 00_01}/query_Insert.sql | 0 queries/{ => 00_01}/select.sql | 0 queries/{ => 00_01}/selectAll.sql | 0 11 files changed, 0 insertions(+), 0 deletions(-) rename queries/{ => 00_01}/createTable.sql (100%) rename queries/{ => 00_01}/create_dept_copy_tab.sql (100%) rename queries/{ => 00_01}/create_dept_table.sql (100%) rename queries/{ => 00_01}/create_emp_table.sql (100%) rename queries/{ => 00_01}/create_old_emp_table.sql (100%) rename queries/{ => 00_01}/insert_dept_table.sql (100%) rename queries/{ => 00_01}/insert_emp_table.sql (100%) rename queries/{ => 00_01}/insert_old_emp_table.sql (100%) rename queries/{ => 00_01}/query_Insert.sql (100%) rename queries/{ => 00_01}/select.sql (100%) rename queries/{ => 00_01}/selectAll.sql (100%) diff --git a/queries/createTable.sql b/queries/00_01/createTable.sql similarity index 100% rename from queries/createTable.sql rename to queries/00_01/createTable.sql diff --git a/queries/create_dept_copy_tab.sql b/queries/00_01/create_dept_copy_tab.sql similarity index 100% rename from queries/create_dept_copy_tab.sql rename to queries/00_01/create_dept_copy_tab.sql diff --git a/queries/create_dept_table.sql b/queries/00_01/create_dept_table.sql similarity index 100% rename from queries/create_dept_table.sql rename to queries/00_01/create_dept_table.sql diff --git a/queries/create_emp_table.sql b/queries/00_01/create_emp_table.sql similarity index 100% rename from queries/create_emp_table.sql rename to queries/00_01/create_emp_table.sql diff --git a/queries/create_old_emp_table.sql b/queries/00_01/create_old_emp_table.sql similarity index 100% rename from queries/create_old_emp_table.sql rename to queries/00_01/create_old_emp_table.sql diff --git a/queries/insert_dept_table.sql b/queries/00_01/insert_dept_table.sql similarity index 100% rename from queries/insert_dept_table.sql rename to queries/00_01/insert_dept_table.sql diff --git a/queries/insert_emp_table.sql b/queries/00_01/insert_emp_table.sql similarity index 100% rename from queries/insert_emp_table.sql rename to queries/00_01/insert_emp_table.sql diff --git a/queries/insert_old_emp_table.sql b/queries/00_01/insert_old_emp_table.sql similarity index 100% rename from queries/insert_old_emp_table.sql rename to queries/00_01/insert_old_emp_table.sql diff --git a/queries/query_Insert.sql b/queries/00_01/query_Insert.sql similarity index 100% rename from queries/query_Insert.sql rename to queries/00_01/query_Insert.sql diff --git a/queries/select.sql b/queries/00_01/select.sql similarity index 100% rename from queries/select.sql rename to queries/00_01/select.sql diff --git a/queries/selectAll.sql b/queries/00_01/selectAll.sql similarity index 100% rename from queries/selectAll.sql rename to queries/00_01/selectAll.sql From dbf40f8e164c8dbb2b2c1b2f51c69ebab33e02e2 Mon Sep 17 00:00:00 2001 From: deepamaddala <91093325+deepamaddala@users.noreply.github.com> Date: Wed, 28 Sep 2022 19:35:56 +0000 Subject: [PATCH 3/8] WHERE condition and ORDER BY --- queries/01_02/ComparisonConditions.sql | 7 +++++++ queries/01_02/LogicalConditions.sql | 5 +++++ queries/01_02/ORDERBY.sql | 3 +++ queries/01_02/OrderOfPrecedence.sql | 3 +++ queries/01_02/WHEREcondition.sql | 3 +++ 5 files changed, 21 insertions(+) create mode 100644 queries/01_02/ComparisonConditions.sql create mode 100644 queries/01_02/LogicalConditions.sql create mode 100644 queries/01_02/ORDERBY.sql create mode 100644 queries/01_02/OrderOfPrecedence.sql create mode 100644 queries/01_02/WHEREcondition.sql diff --git a/queries/01_02/ComparisonConditions.sql b/queries/01_02/ComparisonConditions.sql new file mode 100644 index 0000000..602e1e1 --- /dev/null +++ b/queries/01_02/ComparisonConditions.sql @@ -0,0 +1,7 @@ +SELECT empno, name,hiredate FROM emp_tab WHERE name LIKE '_D%'; + +SELECT * FROM emp_tab WHERE deptno IN (30,40); + +SELECT * FROM emp_tab WHERE salary BETWEEN 2000 AND 6000; + +SELECT empno FROM emp_tab WHERE manager IS NULL; \ No newline at end of file diff --git a/queries/01_02/LogicalConditions.sql b/queries/01_02/LogicalConditions.sql new file mode 100644 index 0000000..b3ec0aa --- /dev/null +++ b/queries/01_02/LogicalConditions.sql @@ -0,0 +1,5 @@ +SELECT * FROM emp_tab WHERE name LIKE 'S%' AND deptno=30; + +SELECT * FROM emp_tab WHERE name LIKE 'S%' OR deptno=30; + +SELECT * FROM emp_tab WHERE deptno NOT IN(30,40); \ No newline at end of file diff --git a/queries/01_02/ORDERBY.sql b/queries/01_02/ORDERBY.sql new file mode 100644 index 0000000..9b4d56b --- /dev/null +++ b/queries/01_02/ORDERBY.sql @@ -0,0 +1,3 @@ +SELECT * FROM emp_tab WHERE deptno=30 ORDER BY salary; + +SELECT * FROM emp_tab ORDER BY deptno,salary DESC; \ No newline at end of file diff --git a/queries/01_02/OrderOfPrecedence.sql b/queries/01_02/OrderOfPrecedence.sql new file mode 100644 index 0000000..98d1fd5 --- /dev/null +++ b/queries/01_02/OrderOfPrecedence.sql @@ -0,0 +1,3 @@ +SELECT empno,name,deptno,salary FROM emp_tab WHERE deptno=30 OR deptno=40 AND salary>2500; + +SELECT empno,name,deptno,salary FROM emp_tab WHERE (deptno=30 OR deptno=40) AND salary>2500; \ No newline at end of file diff --git a/queries/01_02/WHEREcondition.sql b/queries/01_02/WHEREcondition.sql new file mode 100644 index 0000000..d626b9d --- /dev/null +++ b/queries/01_02/WHEREcondition.sql @@ -0,0 +1,3 @@ +SELECT empno,name,salary FROM emp_tab WHERE salary>2500; + +SELECT empno,name, salary FROM emp_tab WHERE name='KING'; \ No newline at end of file From a0384414368157f400011a338c89b7dc4a9a3fa5 Mon Sep 17 00:00:00 2001 From: deepamaddala <91093325+deepamaddala@users.noreply.github.com> Date: Wed, 28 Sep 2022 20:59:27 +0000 Subject: [PATCH 4/8] indentation for long sql statements --- queries/01_02/OrderOfPrecedence.sql | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/queries/01_02/OrderOfPrecedence.sql b/queries/01_02/OrderOfPrecedence.sql index 98d1fd5..3524eab 100644 --- a/queries/01_02/OrderOfPrecedence.sql +++ b/queries/01_02/OrderOfPrecedence.sql @@ -1,3 +1,9 @@ -SELECT empno,name,deptno,salary FROM emp_tab WHERE deptno=30 OR deptno=40 AND salary>2500; +SELECT empno,name,deptno,salary +FROM emp_tab +WHERE deptno=30 OR deptno=40 +AND salary>2500; -SELECT empno,name,deptno,salary FROM emp_tab WHERE (deptno=30 OR deptno=40) AND salary>2500; \ No newline at end of file +SELECT empno,name,deptno,salary +FROM emp_tab +WHERE (deptno=30 OR deptno=40) +AND salary>2500; \ No newline at end of file From 09258cb3736f1dbd333ef5235ad946dc13b660a7 Mon Sep 17 00:00:00 2001 From: deepamaddala <91093325+deepamaddala@users.noreply.github.com> Date: Wed, 28 Sep 2022 21:01:19 +0000 Subject: [PATCH 5/8] ADded indentation --- queries/01_02/ComparisonConditions.sql | 13 +++++++++---- queries/01_02/LogicalConditions.sql | 9 ++++++--- queries/01_02/ORDERBY.sql | 6 ++++-- queries/01_02/WHEREcondition.sql | 8 ++++++-- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/queries/01_02/ComparisonConditions.sql b/queries/01_02/ComparisonConditions.sql index 602e1e1..6c3f224 100644 --- a/queries/01_02/ComparisonConditions.sql +++ b/queries/01_02/ComparisonConditions.sql @@ -1,7 +1,12 @@ -SELECT empno, name,hiredate FROM emp_tab WHERE name LIKE '_D%'; +SELECT empno, name,hiredate +FROM emp_tab +WHERE name LIKE '_D%'; -SELECT * FROM emp_tab WHERE deptno IN (30,40); +SELECT * FROM emp_tab +WHERE deptno IN (30,40); -SELECT * FROM emp_tab WHERE salary BETWEEN 2000 AND 6000; +SELECT * FROM emp_tab +WHERE salary BETWEEN 2000 AND 6000; -SELECT empno FROM emp_tab WHERE manager IS NULL; \ No newline at end of file +SELECT empno FROM emp_tab +WHERE manager IS NULL; \ No newline at end of file diff --git a/queries/01_02/LogicalConditions.sql b/queries/01_02/LogicalConditions.sql index b3ec0aa..e1c3a75 100644 --- a/queries/01_02/LogicalConditions.sql +++ b/queries/01_02/LogicalConditions.sql @@ -1,5 +1,8 @@ -SELECT * FROM emp_tab WHERE name LIKE 'S%' AND deptno=30; +SELECT * FROM emp_tab +WHERE name LIKE 'S%' AND deptno=30; -SELECT * FROM emp_tab WHERE name LIKE 'S%' OR deptno=30; +SELECT * FROM emp_tab +WHERE name LIKE 'S%' OR deptno=30; -SELECT * FROM emp_tab WHERE deptno NOT IN(30,40); \ No newline at end of file +SELECT * FROM emp_tab +WHERE deptno NOT IN(30,40); \ No newline at end of file diff --git a/queries/01_02/ORDERBY.sql b/queries/01_02/ORDERBY.sql index 9b4d56b..cd2dbed 100644 --- a/queries/01_02/ORDERBY.sql +++ b/queries/01_02/ORDERBY.sql @@ -1,3 +1,5 @@ -SELECT * FROM emp_tab WHERE deptno=30 ORDER BY salary; +SELECT * FROM emp_tab +WHERE deptno=30 ORDER BY salary; -SELECT * FROM emp_tab ORDER BY deptno,salary DESC; \ No newline at end of file +SELECT * FROM emp_tab +ORDER BY deptno,salary DESC; \ No newline at end of file diff --git a/queries/01_02/WHEREcondition.sql b/queries/01_02/WHEREcondition.sql index d626b9d..2c769f7 100644 --- a/queries/01_02/WHEREcondition.sql +++ b/queries/01_02/WHEREcondition.sql @@ -1,3 +1,7 @@ -SELECT empno,name,salary FROM emp_tab WHERE salary>2500; +SELECT empno,name,salary +FROM emp_tab +WHERE salary>2500; -SELECT empno,name, salary FROM emp_tab WHERE name='KING'; \ No newline at end of file +SELECT empno,name, salary +FROM emp_tab +WHERE name='KING'; \ No newline at end of file From a9b66d2b0853cb44e2f170031282862d0246454f Mon Sep 17 00:00:00 2001 From: deepamaddala <91093325+deepamaddala@users.noreply.github.com> Date: Wed, 28 Sep 2022 21:23:17 +0000 Subject: [PATCH 6/8] deleted test.db --- test.db | Bin 12288 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test.db diff --git a/test.db b/test.db deleted file mode 100644 index 936911b60af4eace4368461a4a89e7bdc3822f4f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI$ze~eF6bJD8RofKG2@bnaaEK6o$hE-!?9woB*Ijmr_;P9N`vB^|O&#yLA7VvJRMN}tQ%zER7CzlQay zsIdLxw}$>z7pz;64N(009U<00Izz00bZa0SG`~y#!{wn#3`GPRrr-WYq20 zJfvvm))bZsbLuRGot-)nr7cRcf-ds3ZSo$S*`D7d%FYYQy3Xx|nas59V)wrk_NoZo zawd%IZi|iNDCTT@e=~ZTJxu)BelVPu)5UraUN<-hHJs~f!L#90=~t$|^{0OK4FUoX zfB*y_009U<00Izz00bZafprn6D#^E0D^DXSc_N$6 Date: Mon, 7 Nov 2022 16:23:57 +0000 Subject: [PATCH 7/8] Moving files using main --- NOTICE | 3 --- README.md | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/NOTICE b/NOTICE index 547595f..4851a73 100644 --- a/NOTICE +++ b/NOTICE @@ -4,9 +4,6 @@ All Rights Reserved. Licensed under the LinkedIn Learning Exercise File License (the "License"). See LICENSE in the project root for license information. -ATTRIBUTIONS: -[PLEASE PROVIDE ATTRIBUTIONS OR DELETE THIS AND THE ABOVE LINE “ATTRIBUTIONS”] - Please note, this project may automatically load third party code from external repositories (for example, NPM modules, Composer packages, or other dependencies). If so, such third party code may be subject to other license terms than as set diff --git a/README.md b/README.md index 422e093..a8426db 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ -# COURSENAME -This is the repository for the LinkedIn Learning course `course-name`. The full course is available from [LinkedIn Learning][lil-course-url]. +# Hands-On Introduction: SQL +This is the repository for the LinkedIn Learning course Hands-On Introduction: SQL . The full course is available from [LinkedIn Learning][lil-course-url]. + +![Hands-On Introduction: SQL ][lil-thumbnail-url] + +Join instructor Deepa Maddala as she uses hands-on lessons to teach you the tools, techniques, and know-how that you need to start using SQL from day one. Deepa guides you through using the Select statement to fetch and filter data, creating and adding to tables and data, modifying existing tables, and what to use in different scenarios. She includes simple examples with each topic she covers.

The best way to learn a language is to use it in practice. That’s why this course is integrated with GitHub Codespaces, an instant cloud developer environment that offers all the functionality of your favorite IDE without the need for any local machine setup. With GitHub Codespaces, you can get hands-on practice from any machine, at any time—all while using a tool that you’ll likely encounter in the workplace. Check out the [Using GitHub Codespaces with this course][gcs-video-url] video to learn how to get started. -![course-name-alt-text][lil-thumbnail-url] -_See the readme file in the main branch for updated instructions and information._ ## Instructions This repository has branches for each of the videos in the course. You can use the branch pop up menu in github to switch to a specific branch and take a look at the course at that stage, or you can add `/tree/BRANCH_NAME` to the URL to go to the branch you want to access. @@ -22,15 +24,13 @@ To resolve this issue: Add changes to git using this command: git add . Commit changes using this command: git commit -m "some message" -## Installing -1. To use these exercise files, you must have the following installed: - - [list of requirements for course] -2. Clone this repository into your local machine using the terminal (Mac), CMD (Windows), or a GUI tool like SourceTree. -3. [Course-specific instructions] +### Instructor -[0]: # (Replace these placeholder URLs with actual course URLs) +Deepa Maddala -[lil-course-url]: https://www.linkedin.com/learning/ -[lil-thumbnail-url]: http:// +Check out my other courses on [LinkedIn Learning](https://www.linkedin.com/learning/instructors/deepa-maddala?u=104). +[lil-course-url]: https://www.linkedin.com/learning/hands-on-introduction-sql +[lil-thumbnail-url]: https://media.licdn.com/dms/image/D560DAQFce8T-RjMmAg/learning-public-crop_675_1200/0/1667324559752?e=1667955600&v=beta&t=fSwTEREJ2cKzBWmkRcZcirnwL306jvMsnhG0fjLRayA +[gcs-video-url]: https://www.linkedin.com/learning/hands-on-introduction-sql/using-github-codespaces-with-this-course From 3dd4bcf562f8361bb023784b9cdf9d211ba2fc04 Mon Sep 17 00:00:00 2001 From: smoser-LiL Date: Tue, 8 Nov 2022 22:59:27 +0000 Subject: [PATCH 8/8] Moving files using main --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a8426db..ba1fe29 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Hands-On Introduction: SQL -This is the repository for the LinkedIn Learning course Hands-On Introduction: SQL . The full course is available from [LinkedIn Learning][lil-course-url]. +This is the repository for the LinkedIn Learning course Hands-On Introduction: SQL. The full course is available from [LinkedIn Learning][lil-course-url]. ![Hands-On Introduction: SQL ][lil-thumbnail-url]