If you are new to SQL, you still might have heard about aggregate functions. These are functions that can be used inside a SELECT query. In this tutorial we are going to look a bit on what it is, and how it can be used. Read More »
Category Archives: Tutorials
How To Rank Records in Oracle SQL
A long time ago I put together a tutorial (How To Use Oracle Analytic Functions in Oracle SQL) on how to use some of the more common Oracle Analytic Functions. In this tutorial I am going to discuss how to rank records in Oracle using the RANK() and the DENSE_RANK() analytic functions. I chose to put this in a separate post, since it ... Read More »
Quick Tip: How To Pick Random Customers In Oracle
At my work I am responsible for generating data for 90% of our contests. Once in a while there are requests where they want to pick out. i.e. ten random people. This quick tip is showing you one way how to pick random customers in Oracle using SQL. Read More »
Three Ways To Transpose Rows Into Columns in Oracle SQL
Have you ever been in a situation where you as a developer knows that your data is stored in your table rows, but your customer don’t care…wanting to present the data as columns? In this tutorial I will discuss three different variants on how to transpose table rows into columns. By using SUM + DECODE, the new Oracle 11g PIVOT ... Read More »
How To Calculate Difference Between Dates in Oracle SQL
If you have worked with SQL for a while – you have most likely had a time where you wanted to show in a query the difference between two dates. It can be for example to calculate how long a person has been hired in your company, how old a person is today, etc. In this tutorial we are going ... Read More »
How To Use Oracle Analytic Functions in Oracle SQL
A while ago I wrote several similar articles on how to use the different Analytic functions in Oracle. I have now chosen to merge these articles into one useful article/document that you can print out or save to your computer for your own reference. In this tutorial I will try to explain to you how to use them, through practical ... Read More »
How to find first and last date of a month in SQL
Working with dates is fun. In this post we are going to show a method to easily find the first and last date of the current month, previous month, and next month. Knowledge about this will come in handy if you i.e. want to do a year-over-year sales analysis, or maybe you would like to take the current month’s sales ... Read More »
How to Find Previous Friday or Current Friday In SQL
During the years I have worked a lot with Multi Level Marketing (MLM) companies. A common thing for these types of companies is that they pay out commissions once a week, twice a week, once a month, etc. I have been most used to the type of companies that pay out commissions once a week, and often on a Friday. ... Read More »
OracleTuts Oracle Training, Tutorials, and Videos from Beginner to Advanced
