Posts

SQL-Basics 10(Triggers & Case Statement)

                                                            Triggers & Case Statement create database today; use today; select database(); Triggers: -(it basically an action and it invoke automatically) ----->Whenever we are trying to perform any kind of insert/update/delete(DML operations)(data manipulation language).before insert/update/delete, after insert/update/delete some other column, some other table. ----->In the case of functions/procedures we need to call, but for triggers, we do not need to call again, it is a one-time activity. ------>Triggers are applicable for insert/delete/update operations. ------>we have a total of 6 types of triggers. 1)before delete 2)after delete 3)before insert  4)after insert 5)before update 6)after update create table course( course_id int, course_desc varchar(30), course_mentor...

SQL-Basics 9(Joins-Unions-CTE)

                                                            Joins &Unions&CTE  create  database operations; use operations; select database(); JOINS ---->The primary key and foreign key are used to build the relationship b/w the tables. ----->But in this, we are joining the two tables to fetch the specific results(records). create table if not exists course( course_id int, course_name varchar(50), course_desc varchar(50), course_tag varchar(50)); create table if not exists student( student_id int, student_name varchar(50), students_mobile int, student_course_enroll varchar(50), student_course_id int); insert into course values(102,'fsds','FULL STACK DATA SCIENCE','DS'), (103,'aipos','airtificial intillgence opearions','AIOPS'), (104,'bigdata','FULL STACK BIG DATA','BD'), (105,'mern','web dev','MERN'), (111,'blockcha...

SQL-Basics 8(Partitions)

Image
                                                                    -----Partitions---- create database ineuron_partition; use ineuron_partition; select database(); Flat table(Table without partitions):- create table ineuron_courses( course_name varchar(50), course_id int(10), course_title varchar(50), course_desc varchar(50), launch_date date, course_fee int, course_mentor varchar(60), course_launch_year int); select * from ineuron_courses; insert into ineuron_courses values('machine_learning',101,'ML','this is ML course','2019-07-07',3540,'Sudhansu',2019) select * from ineuron_courses; insert into ineuron_courses values('ALOPS',101,'ML','this is ML course','2019-07-07',3540,'Sudhansu',2019), ('DLCVNLP',101,'ML','this is ML course','2019-07-07',3540,'Sudhansu',2019), ('AWS CLOUD',101,'ML','this is ML course','2020-07-0...

SQL-Basics 7(Windwoing Functions)

                                                        Window Functions ------>It is a function, it's trying to work on a subset of the dataset(or) tries to create a specific group  then I have to perform some sort of operations inside that group this is where windows functions  coming to the picture. ----->whenever we try to perform a window operation it will try to create the window size and that particular windows it is trying to apply the functions and that window we can create in multiple ways,  not in a single way. ------>Multiple ways we can create different kinds of windows. ------>"Window" means specific span (or) specific group (or) specific interval. ------>whole data is put into a separate window. ------->we have two types of the windowing function #1)Aggregated  based windowing function(whole data ...