FIRST_VALUE() Window Function – with example in PostgreSQL.

With Window Functions, there is always something to learn. They have numerous moving parts but allow for powerful queries that return powerful results. I recently learned of (new to me, but not new to the SQL world) another interesting Window Function, FIRST_VALUE(). Read on as I explore more about it…

[Head this way for great PostgresSQL blogging >>>]
Advertisements

Searched CASE expression in PostgreSQL – with examples.

In this blog post, we will look at one type of ‘conditional formatting’ that enables you to perform complex calculations. PostgreSQL (and SQL in general) provides us with a couple of variants of the CASE statement which could be used for this very thing, among many many others. Learn with me as I make my way through writing this post…

[Head this way for great PostgresSQL blogging >>>]

The PARTITION BY clause of a Window Function – with an example in MySQL.

In this blog post, I will look at a couple of interesting result sets using the PARTITION BY clause as part of the OVER() clause of a Window Function with an example using MySQL.

[Head this way for great MySQL blogging >>>]

CURSOR errors without HANDLER’s in MySQL – with examples.

In one of my previous posts, CONTINUE HANDLER in MySQL – One way, with examples, I hinted at a forthcoming piece on the topic of using a CURSOR without a CONTINUE HANDLER. Read on and learn the exact error you should see and more importantly, what it means.

[Head this way for great MySQL blogging >>>]

Example of the RENAME USER command in MySQL

Naming your users and specifying their host does not have to be permanent. However, to implement any changes to those two fields, it is better to use the RENAME USER command as opposed to directly updating MySQL system tables. Read on to learn about this command with me…

[Head this way for great MySQL blogging >>>]