gitwtfhub

wtf is analytical-sql-examples?

oracle/analytical-sql-examples — explained in plain English

Analysis updated 2026-07-20 · repo last pushed 2017-08-07

130PLSQLAudience · dataComplexity · 2/5DormantSetup · easy

TL;DR

A recipe book of SQL code snippets for Oracle Database, showing how to do pattern matching, window functions, and stats directly in the database for business analysis.

Mindmap

mindmap
  root((repo))
    What it does
      Pattern matching
      Window functions
      Statistical calculations
      Business analysis
    Audience
      Business analysts
      Oracle developers
      Data analysts
    Use cases
      Top customer trends
      Year-over-year growth
      Product trend spotting
    Status
      No longer maintained
      Moved to LiveSQL
      Historical reference only
    Tech stack
      PLSQL
      Oracle Database

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Find your top customers over the past few quarters using SQL pattern matching.

REASON 2

Calculate year-over-year growth by comparing rows with window functions.

REASON 3

Identify products with a consistent upward sales trend directly in Oracle Database.

REASON 4

Learn advanced analytical SQL techniques by studying ready-to-use script examples.

What's in the stack?

PLSQLOracle Database

How do you spin it up?

Difficulty · easy Time to first run · 5min

Scripts require an Oracle Database instance to run, but can also be tried on Oracle's free browser-based LiveSQL platform.

No license information is provided in the repository.

Wtf does this do

Oracle's analytical-sql-examples is a collection of code snippets showing how to use Oracle Database's advanced SQL features for data analysis. Think of it as a recipe book for business analysts and developers who want to crunch numbers directly in a database rather than exporting data to a separate tool. The examples cover things like pattern matching (finding trends or sequences in your data), window functions (comparing rows to each other, like year-over-year growth), and statistical calculations. Each script demonstrates a specific analytical technique using Oracle's SQL dialect. This would be useful for anyone working with Oracle databases who needs to answer business questions like "who are our top customers over the past three quarters" or "which products show a consistent upward trend." Rather than pulling raw data into Excel or a BI tool, you could write queries that do the heavy lifting right where the data lives. The repository itself is no longer maintained. The author notes that updated scripts and tutorials have moved to Oracle's LiveSQL platform, which is a web-based resource for learning and running SQL directly in the browser. So while this repo still exists as a historical reference, anyone looking for current examples should head there instead.

Yoink these prompts

Prompt 1
Show me how to use Oracle SQL pattern matching to find customers whose purchases have increased every quarter for the past year, based on the examples in oracle/analytical-sql-examples.
Prompt 2
Write an Oracle SQL window function query that calculates year-over-year revenue growth, inspired by the analytical-sql-examples repository from Oracle.
Prompt 3
Using the analytical SQL techniques from Oracle's analytical-sql-examples repo, create a query that ranks products by sales volume and identifies those with a consistent upward trend.
Prompt 4
Convert the Oracle analytical SQL examples for statistical calculations into equivalent queries I can run on Oracle LiveSQL in the browser.

Frequently asked questions

wtf is analytical-sql-examples?

A recipe book of SQL code snippets for Oracle Database, showing how to do pattern matching, window functions, and stats directly in the database for business analysis.

What language is analytical-sql-examples written in?

Mainly PLSQL. The stack also includes PLSQL, Oracle Database.

Is analytical-sql-examples actively maintained?

Dormant — no commits in 2+ years (last push 2017-08-07).

What license does analytical-sql-examples use?

No license information is provided in the repository.

How hard is analytical-sql-examples to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is analytical-sql-examples for?

Mainly data.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.