Home
Search results “Oracle sql month as number”
Working with dates in Oracle PLSQL.
 
23:34
Dates in Oracle PL SQL is definitely the most powerful among all other databases. It gives us full flexibility to manipulate it of our choice, whether you are calculating days, months or year, printing date and time in various format. Useful date functions add_months, months_between, last_day, next_day and to_char helps us a lot in handling date time in our pl sql programming.
Views: 5174 Subhroneel Ganguly
Oracle SQL: Exploring Date Functions
 
07:29
http://www.informit.com/store/oracle-sql-livelessons-video-training-downloadable-9780134275741?WT.mc_id=Social_YT Oracle SQL: Exploring Date Functions is an excerpt from Oracle SQL LiveLessons Video Training -- 6+ Hours of Video -- Oracle SQL LiveLessons Video Training covers the basics of the Oracle SQL programming language. This course covers both Oracle standard SQL and the ANSI approved SQL that Oracle supports. The focus of the course is to give students working knowledge of the Oracle SQL language and at the conclusion of this course, students should be able to query the Oracle database. Description In this LiveLessons video course, Oracle ACE Director Dan Hotka will teach you how to use the SQL query language, interpret business questions into SQL code, and how to use Where clauses sub-queries, complex table join conditions, and how to create table objects and populate tables with data. Students will also learn how to access Oracle from Microsoft products such as Excel. In addition, they will learn how analytical SQL can be used for business analysis. This course will use both Toad and SQL Developer for SQL examples. About the Instructor Dan Hotka is a training specialist and an Oracle ACE director who has more than 37 years in the computer industry and more than 31 years of experience with Oracle products. His experience with the Oracle RDBMS dates back to the Oracle V4.0 days. Dan enjoys sharing his knowledge of the Oracle RDBMS. Dan is well published with 12 Oracle books and well over 200 published articles. He is also the video author for Oracle SQL Performance Tuning for Developers LiveLessons and Oracle PL/SQL Programming Fundamentals. He is frequently published in Oracle trade journals, regularly blogs, and speaks at Oracle conferences and user groups around the world. Visit his website at www.DanHotka.com. Skill Level Beginner Learn How To Use the SQL query language Interpret business questions into SQL code Understand Oracle standard SQL and ANSI SQL Work with Where clauses, sub-queries, and complex table join conditions Create table objects and populate these tables with data Access Oracle from Microsoft products such as Excel Use analytical SQL, useful for business analysts Who Should Take This Course Students who are new to SQL and want to learn Oracle SQL Course Requirements Basic knowledge of what is a database, especially RDBMS and what is a computer programming language http://www.informit.com/store/oracle-sql-livelessons-video-training-downloadable-9780134275741?WT.mc_id=Social_YT
Views: 4641 LiveLessons
Oracle MONTHS_BETWEEN Function
 
02:17
https://www.databasestar.com/oracle-months_between/ The Oracle MONTHS_BETWEEN function allows you to find the number of months between two dates. You can enter two dates and the function returns the difference. This function is often used as part of other calculations. Sometimes you’ll want to know the difference between two dates to perform other functions. The syntax of the MONTHS_BETWEEN function is: MONTHS_BETWEEN(date1, date2) What do these two parameters mean? The function performs date1 minus date2. So, if date1 is larger, the result is positive. If date2 is larger, then the result is negative. What data type is returned? It depends on the values you provide. If the dates are both on the same day of the month (e.g. both on the 10th of the month), then the result is an integer or whole number. If not, then the result will be a decimal value. For more information on the MONTHS_BETWEEN function, including the code used in this video and examples, read the related article here: https://www.databasestar.com/oracle-months_between/
Views: 782 Database Star
Oracle || Date functions Part-1 by dinesh
 
17:06
DURGASOFT is INDIA's No.1 Software Training Center offers online training on various technologies like JAVA, .NET , ANDROID,HADOOP,TESTING TOOLS ,ADF,INFORMATICA,TABLEAU,IPHONE,OBIEE,ANJULAR JS, SAP... courses from Hyderabad & Bangalore -India with Real Time Experts. Mail us your requirements to [email protected] so that our Supporting Team will arrange Demo Sessions. Ph:Call +91-8885252627,+91-7207212428,+91-7207212427,+91-8096969696. http://durgasoft.com http://durgasoftonlinetraining.com https://www.facebook.com/durgasoftware http://durgajobs.com https://www.facebook.com/durgajobsinfo......
Query to Find Employee hired in last n month & year
 
12:17
Hi guys today its very important tpoic in sql how to find the last employee who hired in last month and years. Oracle database Unbeatable,Unbreakable Platform..
Views: 2023 Oracle World
Part 5   SQL query to find employees hired in last n months
 
04:53
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/05/part-5-sql-query-to-find-employees.html This question is asked is many sql server interviews. If you have used DATEDIFF() sql server function then you already know the answer. -- Replace N with number of months Select * FROM Employees Where DATEDIFF(MONTH, HireDate, GETDATE()) Between 1 and N
Views: 161761 kudvenkat
Query to find out Experience of Employee Oracle | Pl sql | sql
 
03:56
Query to find out Experience of Employee Oracle | Pl sql | sql
Views: 1143 Online Pl Sql
Using COUNT in Other Ways (Introduction to Oracle SQL)
 
04:09
Other ways to use the COUNT function in SQL. The full Introduction to Oracle SQL course is available here: https://www.databasestar.com/introduction-to-oracle-sql-course/
Views: 118 Database Star
SQL Row Number / Window Function Example - Top NY Baby Names by Year
 
10:58
Using BigQuery's free tier (1TB per month) we explore baby name data and incorporate the basics of row_number,() where clauses and sub querying to filter inner queries. This was "live" so you see a few errors and my thought process. https://cloud.google.com/bigquery/pricing. A great way to learn SQL (applicable to postgressql, oracle, mssql server and others).
Views: 334 Jeffrey James
Oracle ROUND: Number function
 
03:48
Oracle TRUNC: Number function https://www.youtube.com/watch?time_continue=3&v=4lchx4sseEM Oracle MOD: Number function https://www.youtube.com/watch?v=eMGgo_1y6b4&feature=youtu.be The usage of SELECT Playlist: https://www.youtube.com/watch?v=ZwgiIiD1dWE&list=PLjBraywgeSpEW2f7AK4Ddt6BRxW0HWN74
Oracle TO_TIMESTAMP_TZ Function
 
01:43
https://www.databasestar.com/oracle-timezone-functions/ The Oracle TO_TIMESTAMP_TZ function can be confusing, but we’ll explain it in this video. This function allows you to convert a string value into a TIMESTAMP WITH TIME ZONE value. A TIMESTAMP WITH TIME ZONE value is a type of DATE, but has a few components: - A date, including day, month, and year - A time, including hours, minutes, and seconds - A time zone, which is the number of hours and minutes difference from GMT This is a useful data type because it allows you to store dates in different time zones, and allow users in other time zones to see the data in a way that makes sense to them. The time zone part is the difference from GMT. This means that a “+7:00” is 7 hours ahead of GMT (e.g. Bangkok) and “-5:00” is 5 hours behind GMT (e.g. US Eastern Standard Time). The syntax of the TO_TIMESTAMP_TZ function is: TO_TIMESTAMP_TZ ( input_string [, format_mask] [, nls_param] ) The input_string parameter is the string you want to convert. The format_mask is where you specify the format of the input_string parameter. This is so you can specify the input_string in a variety of formats, and just use this format_mask to indicate which format it is in. The nls_param parameter is another optional parameter, and allows you to specify the returning language of the month and day names. For more information on the Oracle TO_TIMESTAMP_TZ function, including the SQL used in this video, read the related article here: https://www.databasestar.com/oracle-timezone-functions/
Views: 73 Database Star
SQLServer - Count Employee Birthday Month-wise like month name and employee count
 
04:29
Counting employee birthday month-wise like month name and in that particular month how may employee have birthday.
Views: 563 SoftWare Developer
Oracle CURRENT_TIMESTAMP Function
 
02:37
https://www.databasestar.com/oracle-date-functions/ The Oracle CURRENT_TIMESTAMP function will display the current date and time in the session time zone. Just like the CURRENT_DATE function, it uses the session time zone, which is where you logged in from. This could be different to the database time zone. The syntax of the CURRENT_TIMESTAMP function is: CURRENT_TIMESTAMP ( [precision] ) The return type of this function is TIMESTAMP WITH TIME ZONE. The precision parameter is optional, and it lets you specify the number of fractional seconds to return. If this is omitted, it uses the default of 6. It’s different to the SYSTIMESTAMP function, because CURRENT_TIMESTAMP returns the session timezone, and SYSTIMESTAMP returns the database time zone. So, if I’m logging in from Melbourne, Australia, and the database is in London, England, then the CURRENT_TIMESTAMP will return a date and time that’s 10 hours ahead of SYSTIMESTAMP, and in a different time zone. It may be on the same day, or it could be a different day, depending on when I run the function. You can perform arithmetic on this function just like any other date value (e.g. CURRENT_TIMESTAMP - 7 for 7 days ago). However, it might be better to use interval data types so you can keep the original data type. For more information about the Oracle CURRENT_TIMESTAMP function, including all of the SQL shown in this video and the examples, read the related article here: https://www.databasestar.com/oracle-date-functions/
Views: 162 Database Star
How to Fetch Latest record/row from the Table in Oracle Database
 
03:32
You will learn how to How to Fetch Latest record/row from the Table in Oracle Database. Realtime Scenario: This logic can be implemented to find whether the latest record should be inserted or updated to datawarehouse
ADD_MONTHS Function in SQL Query with Example
 
02:32
ADD_MONTHS(): The Oracle/PLSQL ADD_MONTHS function returns a date plus n months. Syntax: ADD_MONTHS( date1, n ) Arguments: date1 is the starting date (before the n months have been added). n is the number of months to add to date1. Example: Let's look at some Oracle ADD_MONTHS function examples and explore how you would use the ADD_MONTHS function in Oracle/PLSQL. ADD_MONTHS('01-Aug-03', 3) would return '01-Nov-03' ADD_MONTHS('01-Aug-03', -3) would return '01-May-03' ADD_MONTHS('21-Aug-03', -3) would return '21-May-03' ADD_MONTHS('31-Jan-03', 1) would return '28-Feb-03' Thanks for watching..:)
Views: 1056 WingsOfTechnology
29. SQL Functions - Numeric
 
09:40
ORACLE SQL NUMERIC FUNCTIONS This video shows oracle numeric functions for beginners. For Group / Aggregate Functions visit : https://youtu.be/tF_qnt_Nt7Y
Views: 62 ProSchool
IsDate, Day, Month, Year and DateName DateTime functions in SQL Server   Part 26
 
12:51
In this video we will learn about built-in date and time functions in sql server, specifically IsDate, Day, Month, Year and DateName functions. Finally a practical example of using these DateTime functions. Text version of the video http://csharp-video-tutorials.blogspot.com/2012/09/isdate-day-month-year-and-datename.html Slides http://csharp-video-tutorials.blogspot.com/2013/08/part-26-datetime-functions-continued.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists
Views: 142223 kudvenkat
Cast and Convert functions in SQL Server   Part 28
 
17:26
In this video we will learn, converting one data type to another using cast() and convert() functions. We will also learn how to use the style parameter, with convert() function. Finally we will look at a practical example of using CAST or CONVERT functions, along with group by. We will also talk about the differences between CAST and CONVERT functions and when to choose one over the other. Text version of the video http://csharp-video-tutorials.blogspot.com/2012/09/cast-and-convert-functions-in-sql.html Slides http://csharp-video-tutorials.blogspot.com/2013/08/part-28-cast-and-convert-functions.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists
Views: 169191 kudvenkat
Using Rownum to find out Nth record from First, Last and within a range in a table.
 
04:59
Using Rownum to find the first nth record and last nth record and in between record in emp table. This is the most frequesntly questions ever asked in interviews.
Views: 3041 Kiranjit Parida
Oracle TO_TIMESTAMP Function
 
01:31
https://www.databasestar.com/oracle-to_timestamp/ The Oracle TO_TIMESTAMP function can be confusing, but we’ll explain it in this video. This function allows you to convert a string value into a TIMESTAMP value. A TIMESTAMP value is a type of DATE, but has a few components: - A date, including day, month, and year - A time, including hours, minutes, seconds, and fractional seconds This is a useful data type because it allows you to store a time down to fractions of a second. The syntax of the TO_TIMESTAMP function is: TO_TIMESTAMP ( input_string [, format_mask] [, nls_param] ) The input_string parameter is the string you want to convert. The format_mask is where you specify the format of the input_string parameter. This is so you can specify the input_string in a variety of formats, and just use this format_mask to indicate which format it is in. The nls_param parameter is another optional parameter, and allows you to specify the returning language of the month and day names. The default format will depend on the region you’re running your database in. In my example (using Oracle Express in Australia), the default format is ‘DD-MM-RRRR HH:MI:SS AM’. For more information on the Oracle TO_TIMESTAMP function, including the SQL used in this video, read the related article here: https://www.databasestar.com/oracle-to_timestamp/
Views: 297 Database Star
SQL query to find first record and last record in single query
 
08:55
SQL query to find first record and last record in single query
Views: 7530 SQL Guru
SQL Tutorial - SQL DATE Functions like GETDATE, DATEADD, CONVERT
 
09:54
http://www.learningsqlserver2008.com/ https://youtu.be/KmsmPOImpHo - Date functions in SQL Server 2012 GETDATE -- Today's date DATEADD - adding time interval to an existing Date DATEPART - return part of the date like year or month DATEDIFF - Give you the different between two dates DAY - returns the day of the month MONTH - return the Month of the Year YEAR - returns the year in the Sql expression CAST - Converts an expression of one data type to another in SQL Server 2008 R2 CONVERT - Convert expressions of one data type to another in sql server r2 SQL Tutorial
Views: 55279 baghul
Date Functions (Introduction to Oracle SQL)
 
05:48
Learn what date functions are and see some examples of them. The full Introduction to Oracle SQL course is available here: https://www.databasestar.com/introduction-to-oracle-sql-course/
Views: 179 Database Star
SQL Aggregation queries using Group By, Sum, Count and Having
 
10:01
From SQL Queries Joes 2 Pros (Vol2) ch4.1. Learn up to write aggregated queries.
Views: 162393 Joes2Pros SQL Trainings
Session6 Data type in Oracle
 
15:25
Session 6: Datatypes In Oracle   ALPHABET           : A-Z , a-z NUMBER              : 0-9 (with precision and scale) DATE / Temporal  : any Date and time (Hours, Minutes, Seconds, Mili-seconds, Timestamp, Timezone etc)   Alphabet + Number = Alphanumeric Data                                     = String / CHARACTER Datatype Category Number                    =  Numeric Datatype Category Date                         = Date Datatype Category 1. CHARACTER Datatype: CHAR, VARCHAR, NCHAR: CHAR is fixed length datatype and VARCHAR is Variable length datatype to store character data. i.e. A-Z , a-z , 0-9 , all keyboard characters etc. The default size is 1 character and it can store maximum up to 2000 bytes. Example : EName, EmpID, PassportNo, SSN, etc. EName CHAR(10) := ‘TOM’; wastage of 7 space after the string EName VARCHAR(10) := ‘TOM’; Spaces can be Reuse which left after the string NCHAR additionally handles NLS(National Language Support). Oracle supports a reliable Unicode datatype through NCHAR , NVARCHAR2 , and NCLOB  VARCHAR2, NVARCHAR2: These are Variable length datatype. VARCHAR2 handles alphanumeric character string whereas NVARCHAR2 handles alphanumeric character string with NLS(National Language Support). The default size is 1 character and it can store maximum up to 4000 bytes.   LONG:  Variable length string.  (Maximum size: 2 GB - 1) Only one LONG column is allowed per table. RAW:    Variable length binary string (Maximum size 2000 bytes) LONG RAW: Variable length binary string (Maximum size 2GB) 2. NUMERIC Datatype: NUMBER: It stores Numeric values and performs numeric calculations. NUMBER,   NUMBER(n),   NUMBER(p,s) It stores Numbers up to 38 digits of precision. SeqNo NUMBER;                     1, 123, 12345678 EmpID NUMBER(4);                 1, 123, 1234 Sal NUMBER(7,2);                     23456.78 , 123.45 — correction in video: Sal NUMBER(a7,2); which is wrong please ignore. 1234567 can be a type of NUMBER, NUMBER(7), NUMBER(7,0) It can store both integer and floating point numbers NUMERIC(p,s) FLOAT:   Ex:  EmpSal FLOAT;    FLOAT(7)       Decimal Points allowed DEC(p,s), DECIMAL(p,s) , REAL, DOUBLE PRECISION INTEGER:   Ex:  SSN INTEGER;       Decimal Points are not allowed INT, SMALLINT 3. DATE Datatype: DATE: It stores DATE(Date, Month, Year) and Time(Hour, Minute, Second, AM/PM) and performs calculations with such data. Default DATE format in Oracle is “DD-MON-YY” Based on "Gregorian calendar" where the date ranges from “JAN 1 4712 BC” to “DEC 31 9999 AD” doj DATE;    “18-MAR-2010 12:30:00 PM” TIMESTAMP:    It can store all parameters as DATE datatype and additionally it can have “Fraction of seconds” and TIMESTAMP WITH TIMEZONE / TIMESTAMP WITHOUT TIMEZONE. Range from 0-9 digits, the default size is 6. 4. LOB Datatype: LOB: “Large Object” data. It can store pictures, motion pictures, Textfiles etc. CLOB: “Character Large Object” is used to store structured information like a text file with a specific file format. BLOB: “Binary Large Object” is used to store Un-structured information like Image, JPEG files, MPEG files etc. BFILE: “Binary File” is used to store the pointer to a specific file / Just store the location of a file. Maximum size: (4 GB - 1) * DB_BLOCK_SIZE initialization parameter (8 TB to 128 TB) Extra Information: NCLOB : It supports all the character set supported by CLOB and additionally it handles NLS(National Language Support ) Maximum size: (4 GB - 1) * DB_BLOCK_SIZE initialization parameter (8 TB to 128 TB) ROWID and UROWID(optional size) Datatype: contains fixed length Binary data. BBBBBBB.RRRR.FFFFF combination of BLOCK-ROW-DATABASE FILE Physical and Logical ROWID Upcoming Session: Session 7: Populating Data into Tables(INSERT Statement): Inserting data into all columns of a table Inserting data into Required columns of a table Inserting NULL value into a table Inserting Special Values(USER / SYSDATE) into a table Supplying data at runtime(using & and &&) THANK YOU :)
SQL - Multiple Row_Number functions addressing different partitions
 
04:01
Find the top selling days per quarter as well as month by using 2 window functions (ROW_NUMBER) which address the month and quarter as differing partitions.
Views: 290 Jeffrey James
Sql query to select all names that start with a given letter without like operator
 
03:02
Text Article http://csharp-video-tutorials.blogspot.com/2017/01/sql-query-to-select-all-names-that.html Slides http://csharp-video-tutorials.blogspot.com/2017/01/sql-query-to-select-all-names-that_31.html SQL Server Interview Questions and Answers text articles & slides http://csharp-video-tutorials.blogspot.com/2014/05/sql-server-interview-questions-and.html SQL Server Interview Questions and Answers playlist https://www.youtube.com/playlist?list=PL6n9fhu94yhXcztdLO7i6mdyaegC8CJwR All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists In this video we will discuss writing a SQL query to retrieve all student names that start with letter 'M' without using the LIKE operator. If the interviewer has not mentioned not to use LIKE operator, we would have written the query using the LIKE operator as shown below. SELECT * FROM Students WHERE Name LIKE 'M%' We can use any one of the following 3 SQL Server functions, to achieve exactly the same thing. CHARINDEX LEFT SUBSTRING The following 3 queries retrieve all student rows whose Name starts with letter 'M'. Notice none of the queries are using the LIKE operator. SELECT * FROM Students WHERE CHARINDEX('M',Name) = 1 SELECT * FROM Students WHERE LEFT(Name, 1) = 'M' SELECT * FROM Students WHERE SUBSTRING(Name, 1, 1) = 'M'
Views: 51736 kudvenkat
Oracle Date Format
 
07:13
http://www.databasestar.com/oracle-to_date/ - A video that explains the different date formats in the Oracle SQL database.
Views: 3339 Database Star
38. Date Functions - Add_Months, Last_Day, Months_Between, Next_Day, To_Date, New_Time in Oracle
 
07:53
In this video you will learn about Date Functions { Add_Months(), Last_Day(), Months_Between(), Next_Day(), To_Date(), New_Time() } in Oracle. Unlike other programming language Oracle also uses functions to perform common operations. For Support =========== Email: [email protected] Contact Form: http://www.learninhindi.com/home/contact Our Social Media ================ Facebook: https://www.facebook.com/LearnInHindi Twitter: https://twitter.com/LearnInHindi For Training & Videos ===================== For more videos and articles visit: http://www.learninhindi.com Free Java Programming In Hindi Course ===================================== https://www.youtube.com/playlist?list=PLOZ3jentlCDAwwhMyoLISrxkXTADGp7PH Free Oracle PL/SQL Programming In Hindi Course ============================================== https://www.youtube.com/playlist?list=PLB5DA82419C2D99B6 Free C Programming In Hindi Course ================================== https://www.youtube.com/playlist?list=PLOZ3jentlCDAxKpBLMWogxSdy6BZcsAJq Trips & Tricks Channel ====================== https://www.youtube.com/channel/UCGmLfkuCo-3lHHJXRJ9HUMw Programming in Hindi Channel ============================ https://www.youtube.com/channel/UCudElIDgwNrybeAvXIy1HZQ
Views: 18565 ITORIAN
SQL 37 -How to calculate age Part 1
 
05:05
Structured Query Languge
Views: 6332 hammadshams
Year-to-Date using Partition By with Windowing - SQL Training Online
 
05:43
You can use the Partition By Function in SQL Server to get a Year-to-Date and Month-to_Date calculation. In this video I show you how to create a Year-to-Date value using the Windowing Partition By Function in TSQL. READ THE ORIGINAL ARTICLE WITH SQL SCRIPTS HERE http://www.sqltrainingonline.com/year-to-date-using-the-partition-by-function-with-windowing-in-sql-server/ YOUTUBE NEWS UPDATES http://www.youtube.com/user/sqltrainingonline VISIT SQLTRAININGONLINE.COM FOR TONS MORE VIDEO NEWS & TIPS http://www.sqltrainingonline.com SUBSCRIBE FOR OTHER SQL TIPS AND NEWS! http://www.youtube.com/subscription_center?add_user=sqltrainingonline SUBSCRIBE TO OUR EMAIL LIST! http://www.sqltrainingonline.com LET'S CONNECT! Google+: http://gplus.to/SQLTrainingOnline Facebook: http://facebook.com/SQLTrainingOnline Twitter: http://twitter.com/sql_by_joey Linkedin: http://linkedin.com/in/joeyblue SQLTrainingOnline: http://www.sqltrainingonline.com
Views: 1825 Joey Blue
SQL MONTH() Function
 
01:36
The SQL MONTH() is a function, and return or extract the month value (a whole integer number from 1 to 12) of a given input date value.
Views: 203 suresh babu
PIVOT Tutorial - generating dynamic column with PIVOT Interview Question SQL
 
14:14
In this lecture you will learn about PIVOT operator and using it to generate dynamic columns.PIVOT is very use full operator to convert values into columns. PIVOT: •Convert your output from (values)vertical order to horizontal(making columns) one Topic to cover: •PIVOT example •PIVOT syntax •Interview Question •PIVOT on northwind •Dynamic PIVOT query http://www.techsapphire.in/index/pivot_sql_lesson_with_generating_dynamic_columns_with_pivot/0-158
Views: 27232 techsapphire
Part 1   How to find nth highest salary in sql
 
11:45
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/05/part-1-how-to-find-nth-highest-salary_17.html This is a very common SQL Server Interview Question. There are several ways of finding the nth highest salary. By the end of this video, we will be able to answer all the following questions as well. How to find nth highest salary in SQL Server using a Sub-Query How to find nth highest salary in SQL Server using a CTE How to find the 2nd, 3rd or 15th highest salary Let's use the following Employees table for this demo Use the following script to create Employees table Create table Employees ( ID int primary key identity, FirstName nvarchar(50), LastName nvarchar(50), Gender nvarchar(50), Salary int ) GO Insert into Employees values ('Ben', 'Hoskins', 'Male', 70000) Insert into Employees values ('Mark', 'Hastings', 'Male', 60000) Insert into Employees values ('Steve', 'Pound', 'Male', 45000) Insert into Employees values ('Ben', 'Hoskins', 'Male', 70000) Insert into Employees values ('Philip', 'Hastings', 'Male', 45000) Insert into Employees values ('Mary', 'Lambeth', 'Female', 30000) Insert into Employees values ('Valarie', 'Vikings', 'Female', 35000) Insert into Employees values ('John', 'Stanmore', 'Male', 80000) GO To find the highest salary it is straight forward. We can simply use the Max() function as shown below. Select Max(Salary) from Employees To get the second highest salary use a sub query along with Max() function as shown below. Select Max(Salary) from Employees where Salary [ (Select Max(Salary) from Employees) To find nth highest salary using Sub-Query SELECT TOP 1 SALARY FROM ( SELECT DISTINCT TOP N SALARY FROM EMPLOYEES ORDER BY SALARY DESC ) RESULT ORDER BY SALARY To find nth highest salary using CTE WITH RESULT AS ( SELECT SALARY, DENSE_RANK() OVER (ORDER BY SALARY DESC) AS DENSERANK FROM EMPLOYEES ) SELECT TOP 1 SALARY FROM RESULT WHERE DENSERANK = N To find 2nd highest salary we can use any of the above queries. Simple replace N with 2. Similarly, to find 3rd highest salary, simple replace N with 3. Please Note: On many of the websites, you may have seen that, the following query can be used to get the nth highest salary. The below query will only work if there are no duplicates. WITH RESULT AS ( SELECT SALARY, ROW_NUMBER() OVER (ORDER BY SALARY DESC) AS ROWNUMBER FROM EMPLOYEES ) SELECT SALARY FROM RESULT WHERE ROWNUMBER = 3
Views: 832895 kudvenkat
Writing Basic SQL to get Sales Data
 
10:53
http://www.ReportingGuru.com produced this video. This video shows basic SQL that you would need to aggregate your data for a sales report. The query would be used in a various reporting tools as a data source. The reporting tool is then used to display and format your data. Email us at [email protected] if you need help, custom reports, or reporting architecture setup. Our phone number is 1-(800) 921-4759
Views: 2740 Reporting Guru
Formatting your Oracle Query Results Directly to CSV
 
03:02
How to get Oracle SQL Developer to automatically format your query results to CSV, HTML, JSON, Insert statements, and more.
Views: 38843 Jeff Smith
Part 8   SQL Query to find department with highest number of employees
 
04:04
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/06/part-8-sql-query-to-find-department.html Scenario asked in the SQL Server Interview Based on the above two tables write a SQL Query to get the name of the Department that has got the maximum number of Employees. To answer this question it will be helpful if you the knowledge of JOINS & GROUP BY in SQL Server. We discusses these in Parts 11 & 12 of SQL Server Tutorial video series. SQL query that retrieves the department name with maximum number of employees SELECT TOP 1 DepartmentName FROM Employees JOIN Departments ON Employees.DepartmentID = Departments.DepartmentID GROUP BY DepartmentName ORDER BY COUNT(*) DESC Scenario asked in the SQL Server Interview Based on the above two tables write a SQL Query to get the name of the Department that has got the maximum number of Employees. To answer this question it will be helpful if you the knowledge of JOINS & GROUP BY in SQL Server. We discusses these in Parts 11 & 12 of SQL Server Tutorial video series. SQL query that retrieves the department name with maximum number of employees SELECT TOP 1 DepartmentName FROM Employees JOIN Departments ON Employees.DepartmentID = Departments.DepartmentID GROUP BY DepartmentName ORDER BY COUNT(*) DESC
Views: 112338 kudvenkat
Part 6   Transform rows into columns in sql server
 
08:53
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/06/part-6-transform-rows-into-columns-in.html This is another common sql server interview question. We will be using Countries table in this example. SQL to create the table Create Table Countries ( Country nvarchar(50), City nvarchar(50) ) GO Insert into Countries values ('USA','New York') Insert into Countries values ('USA','Houston') Insert into Countries values ('USA','Dallas') Insert into Countries values ('India','Hyderabad') Insert into Countries values ('India','Bangalore') Insert into Countries values ('India','New Delhi') Insert into Countries values ('UK','London') Insert into Countries values ('UK','Birmingham') Insert into Countries values ('UK','Manchester') Here is the interview question. Write a sql query to transpose rows to columns. Using PIVOT operator we can very easily transform rows to columns. Select Country, City1, City2, City3 From ( Select Country, City, 'City'+ cast(row_number() over(partition by Country order by Country) as varchar(10)) ColumnSequence from Countries ) Temp pivot ( max(City) for ColumnSequence in (City1, City2, City3) ) Piv
Views: 179575 kudvenkat
Best Way to Write Basic SQL Queries
 
13:33
SQL Server Query writing strategies is something I have yet to find in any book. When enthusiastic SQL students do this, they experience a revelation. The number of errors drops significantly and the speed at writing complex queries increases immediately. Knowing how to narrow down what we are looking for amongst a vast list of choices helps immensely. Grabbing the right tables first and then the fields second is akin to grabbing the right menu before ordering an item from it. In fact, one student named Tim took this back to his team of SQL developers and they immediately implemented this process. We are all used to following steps. Most of the time, actions are sequential from top to bottom or left to right. Other times we complete things in phases. The two phases we are going to use in this exercise apply to joining tables. This is easy to implement as we only need remember to organize first and clean up second. When visiting a new restaurant, we will ask to see the menu, because we want to see all they have to offer. The odds are that we might be interested in half of the items, but only need a few dishes for our group at the table. Looking at the menu is like starting a query with a ‘SELECT *’ statement. Once we have looked at all the fields, we narrow our choice(s) to only the items we want at the time. Sometimes restaurants have multiple menus. My favorite restaurant has a kids’ menu, an adult menu, a gluten-free menu and a drink menu. These menus were each gathered at our table. Ultimately, in my head, a selection was narrowed to what was needed. Phase I: Organize. When building a new query from many tables, we often find ourselves wondering, “Where do I start?” First, lay the steps out by identifying which tables contain the essential data. Second, get all the table joins working with a basic ‘SELECT *’ statement. Third, add any basic filtering criteria. Phase II: Itemize. Once all joins and criteria, such as SELECT, FROM and WHERE are working, we are ready for Phase II. This entails going back and changing our ‘SELECT *’ to an itemized SELECT field list as the final step. Let’s explore how this two-phase process of Organize and then Itemize can be a big time-saver. We are going to use one of the challenges from the last lab. In Lab 3.2 (Outer Joins), Skill Check 2, we needed to get four fields from two different tables. If we were to list all four desired fields and test one table at time, we will get an error as seen on the right side of the figure below. In the figure below we write a SELECT statement and part of the FROM clause. When completed, the FROM clause will have two tables, but for now we just want to get the Location table working. By using the ‘SELECT *’ strategy, we remove any possible errors from line 1. From there, we can focus on the more complicated logic used for joining tables together. We can add tables one at a time until everything is working. This is the Organize phase. NOTE: SELECT * never results in an Error message stating “invalid column name”, however; a SELECT list with itemized field(s) can have this error. After our query is organized and working, we can go back and itemize the SELECT field list to display only the fields that are necessary. This is done during Phase II (Itemize). The steps for this system are broken down as follows: Since SELECT is always the first statement in a query, it’s natural to want to write the field names before writing the FROM clause. However; we can save time and trouble by using the ‘*’ until the entire query is working properly. When this is complete, it is very easy to itemize the field list, with the confidence of knowing it will not cause any problems. Exercise: Simple membership for a club: Table1 (id_Member,name_Member, email_member, title, age, company) Table2 (id_Club,club_name, club_Location, address) Table3 (id_club, id_member,membership_date) Q1: Show all member names, email, age, and company from Table1 Q2: Show all club name, location, and address data Q3: Show member name, club name, club location (hint: Use joins and all 3 tables) You can find all other classes related to this video here: http://www.joes2pros.com/joes2pros/Course/Introduction_To_Microsoft_SQL_Server Enroll Today & Get the First Month for only $1! Use code: YOUTUBE1
Views: 191525 Joes2Pros SQL Trainings
How to calculate date,year,moth,week from date in sql server  -Sql Server
 
02:11
How to calculate date,year,moth,week from date -Sql Server
Views: 2149 GoPro
MySQL- Get Data Between Two Dates
 
01:26
Get Source Code/Read : http://intactabode.com/ For Developing support email your Details at : [email protected] Install Free Trail GST Ready Accounting Package Send your Contact information Name, Email, Contact Number to watch demo in English : https://www.youtube.com/watch?v=a4sFNtZuYzs&ab_channel=IntactAbode watch demo in Hindi : https://www.youtube.com/watch?v=I3eCieDpG3o&ab_channel=IntactAbode How to get Records between two dates in SQL Watch More Frequently Used Sql Queries in all Databases Complete Playlist: https://www.youtube.com/playlist?list=PLErD1cRL87W992bgZ_TX7gxl5UKuP9yF9 this example show how to get data between two dates in sql usin Between operator For Source Code Visit : http://corneey.com/wJ6X2K Subscribe to YouTube channel http://corneey.com/wJ6VoC Like us on Facebook http://corneey.com/wJ6C2l Follow us on Twitter http://corneey.com/wJ6C7x Follow me on Google+ http://corneey.com/wJ6Vhc linkedin http://corneey.com/wJ6V5g
Views: 8844 Intact Abode
SQL YEAR() Function
 
01:25
The SQL YEAR() is a function, and returns or extract year portion(a four digit number) of a given input date value.
Views: 223 suresh babu
Count Total Number Of Column From Sql Syntax Error Dump Data By Ali Khan
 
10:08
Asalam O Walikum Here Ali Khan (Devil Killer) Count Total Numbers Of Column From Sql Syntax Error Learning Practice Site Its Awesome Site For Learing Sql Pakistan Zindabad :) Me Facebook https://www.facebook.com/AkDk123
Views: 367 Devil Killer
Oracle, Find Failed Queries
 
03:54
It is very difficult to find failed queries executed by Entity Framework. Use following plsql trigger to find quries CREATE TABLE QUERY_LOG ( ID NUMBER, ORA_ERR VARCHAR2(10), EXE_DATE DATE, QRY_LOG NCLOB) / CREATE SEQUENCE QUERY_LOG_ID NOCACHE / CREATE OR REPLACE TRIGGER Failed_To_Extend_Temp AFTER SERVERERROR ON DATABASE DECLARE l_sql_text ora_name_list_t; l_n NUMBER; t1 NCLOB; BEGIN --IF (is_servererror(942) ) THEN l_n := ora_sql_txt(l_sql_text ); FOR I IN 1 .. l_n LOOP t1 := t1||l_sql_text(i); END LOOP; INSERT INTO QUERY_LOG (Id , Ora_Err , EXE_DATE , QRY_LOG) VALUES (QUERY_LOG_ID.Nextval, ora_server_error(1), Sysdate,t1 ); --END IF; END; /
Views: 47 Nivas Shelke
Trivia: Which NoSQL Datastore⁉️ Oracle's Journey Assessing Cassandra, Scylla, Redis...
 
05:06
Pre-event trivia hosted by Eric David Benari from the Database Month NoSQL & NewSQL NYC Meetup: Which NoSQL Datastore⁉️ Oracle's Journey Assessing Cassandra, Scylla, Redis... https://youtu.be/DZeNEKj086Q presented by Aaron Stockton, Principal Software Engineer, Oracle Data Cloud Trivia questions (watch the video for the answers!) • What year were the GDPR regulations intially proposed? • What year did Oracle first participate in the America's Cup yacht competition? • Cassandra was developed at which organization? • What language is Apache Cassandra written in? • What language is ScyllaDB written in? • What is the maximum data per node that is recommended for use with Cassandra? • What is the recommended data per node for use with Scylla? • What is the maximum number of CPUs that you can run with ScyllaDB? • Using Amazon i3.metal instances, what is the maximum disk read bandwidth that ScyllaDB can achieve?
Overview of SQL Server Data Types: Time Zone Aware Dates
 
14:51
This video is part of LearnItFirst's Transact-SQL Programming: SQL Server 2008/R2 course. More information on this video and course is available here: http://www.learnitfirst.com/Course161 In the last video, you looked at a mixture of old and new temporal data types. In this video, Scott focuses on DATETIME2 and DATETIMEOFFSET. He will start by reviewing some date/time commands and introducing some new ones, and you will see some important things to keep in mind when using a DATETIMEOFFSET data type. What is the disadvantage of using the DATEADD function instead of the SWITCHOFFSET function? Highlights from this video: - What command returns the UTC date? - The SYSDATETIME function - What is the advantage of using DATETIME2? - How do you get a time zone aware version of DATETIME2? - Changing the time zone and much more...
Views: 5387 LearnItFirst.com
3i Infotech plsql develpoer interview questions and answers
 
03:19
Direct Walkin | Pl \ Sql | Chennai | 1 - 5 yrs 3i Infotech Limited 2 - 5 yrs Chennai 3i Infotech Limited Careers Walkin Interview First week of every month - 10 AM I am Interested I am not Interested Express interest to recruiter and also get a reminder of this walk-in Openings : 250 Job Applicants: 188 Job Views: 826 Pls find below JD. Primary Skill : Pl/sql Developer Secondary Skill : Forms & Reports (D2K) (not mandatory) Location : Chennai, Hyd and banglore Exp : 2 - 4 years Interview Date : 04-02-2017 Interview Time : 10 AM - 2PM Interested candidates can directly come for a face to face interview on the below venue. 3i Infotech Limited 3rd Floor, Prince Infocity II, Rajiv Gandhi Salai (OMR), Kandanchavadi, Chennai 600 096.
Views: 3571 Oracle PL/SQL
FORMAT() function in SQL Server 2012
 
09:13
FORMAT() function in SQL Server 2012 Check the whole "SQL Server 2012" series here: https://www.youtube.com/playlist?list=PLU9JMEzjCv17Wwmn5iFbDs5kIyvn8M3xd Check my SQL blog at: http://sqlwithmanoj.com/ Check my SQL FB Page at: https://www.facebook.com/sqlwithmanoj
Views: 4095 SQL with Manoj
How to get month name from date in SQL?
 
01:25
In this video tutorial you will learn How to get month name from date in SQL? Check query used at http://www.roseindia.net/sql/sqldate/mysql-date-month-name.shtml Check more tutorials at: http://www.roseindia.net/ http://www.roseindia.net/java/ http://www.roseindia.net/hibernate/ http://www.roseindia.net/struts/ http://www.roseindia.net/spring/ http://www.roseindia.net/ajax/ http://www.roseindia.net/jsp/
Views: 1165 roseindiatutorials

Cover letter for debt collector resume sample
What is a cover letter for a resume definition
My best paper writing service
How to write application to school principal for job
Internships cover letter samples