PostgreSQL

SQLServerCentral Article

PostgreSQL 101: A guide to PostgreSQL documentation & useful resources

  • Article

In the latest webinar of our PostgreSQL 101 series, join Ryan Booz, PostgreSQL Advocate at Redgate, and Grant Fritchey, Microsoft Data Platform MVP, and discover:

How to navigate PostgreSQL documentation
The essential things you need to know about PostgreSQL documentation
Other useful learning resources to help make your journey to using PostgreSQL easier

Please register to watch the recording.

2023-10-02

531 reads

External Article

PostgreSQL Basics: Getting started with psql

  • Article

PostgreSQL has a separate command-line tool that’s been available for decades and is included with any installation of PostgreSQL. Many long-term PostgreSQL users, developers, and administrators rely on psql to help them quickly connect to databases, examine the schema, and execute SQL queries.

Knowing how to install and use basic psql commands is an essential skill to have for anyone that will connect to PostgreSQL.

2023-09-20

External Article

PostgreSQL Schema: Learning PostgreSQL with Grant

  • Article

An important aspect of building and managing a database is organizing the objects within your database. You may have tables that support different functions, for example, a schema for warehousing operations and another for sales. Some logins may need access to some tables, but not others. You might want to isolate one set of objects within a database from other sets of objects. All of this, and more, can be accomplished using schemas within a database and PostgreSQL supports the use of schema for just these types of functions.

2023-08-16

SQLServerCentral Editorial

Same Language, Different Words

  • Editorial

I had to come to the Redgate office in Cambridge this past week for a department onsite. As a result, my wife and I were able to come early for a few days adventuring together, the first trip we've taken by ourselves in nearly seven years. As a large family with six kids, it takes […]

You rated this post out of 5. Change rating

2023-06-17

124 reads

External Article

Are PostgreSQL memory parameters magic?

  • Article

Ordinary PostgreSQL users often do not know that PostgreSQL configuration parameters exist, let alone what they are and what they mean. Some parameter tuning can improve the database performance, and we are usually talking about 10%, 20%, and in rare cases, up to 50% performance improvement.

2023-06-14

Blogs

T-SQL Tuesday #180: Good enough is perfect

By

How can you achieve good enough without compromising the process/product? In the world of...

How to Convert FileTime to DateTime

By

One of my customers recently wanted to rename each of the SQL audit files...

The pros and cons of self-service BI: What every industry leader should know

By

The post The pros and cons of self-service BI: What every industry leader should...

Read the latest Blogs

Forums

What's New for the Microsoft Data Platform

By Steve Jones - SSC Editor

Comments posted to this topic are about the item What's New for the Microsoft...

Using Outer Joins

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Using Outer Joins

Closest to ProcDate

By boehnc

Not sure I have this 2nd left join correct. I need to grab the...

Visit the forum

Question of the Day

Using Outer Joins

I have this data in a SQL Server 2019 database:

Customer table
CustomerID CustomerName
1          Steve
2          Andy
3          Brian
4          Allen
5          Devin
6          Sally

OrderHeader table
OrderID CustomerID OrderDate
1       1          2024-02-01
2       1          2024-03-01
3       3          2024-04-01
4       4          2024-05-01
6       4          2024-05-01
7       3          2024-06-07
8       2          2024-04-07
I want a list of all customers and their order counts for a period of time, including zero orders. If I run this query, how many rows are returned?
SELECT 
  c.CustomerName, COUNT(oh.OrderID)
 FROM dbo.Customer AS c
LEFT JOIN dbo.OrderHeader AS oh ON oh.CustomerID = c.CustomerID
WHERE oh.Orderdate > '2024/04/01'
GROUP BY c.CustomerName

See possible answers