The Bit Bucket

Writing SQL Queries for Oracle Course Released

Writing SQL Queries for Oracle Course Released

More SQL love !

Creating reports, analytics, or applications? And need to get data out of Oracle? Learn to write SQL queries like a pro !

We have very popular SQL courses, for T-SQL, PostgreSQL, Snowflake, and MySQL. We’ve just added our new course Writing SQL Queries for Oracle and you can enrol in it now. It’s already low cost but even better, if you use the coupon code HNY2026 at checkout before 5th January, you can take advantage of our Happy New Year 25% discount as well.

2025-12-23

SQL: Parallel Programming In TSQL: Is It In Our Future?

SQL: Parallel Programming In TSQL: Is It In Our Future?

Upcoming processors are likely to have even more cores than now. Have you ever tried to write multiprocessor-style code? A friend of mine recently said that he learned some of this style of coding but later when he came back to it, he realised how much he thought he knew but didn’t.

For languages like T-SQL, we don’t have inherent support for multi-threading. In fact, the only trace I can see of this in T-SQL today is the ability to have multiple readers on a service broker queue.

2025-12-22

SQL Interview: 99 Table join order

SQL Interview: 99 Table join order

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Development Level: Medium

Question:

You are writing a query that involves inner joins across five tables. Does the order of the tables within the query affect the query plan?

Answer:

No. SQL Server determines the best order for you to join the tables in.

2025-12-21

SQL Interview: 115 Database information in master

SQL Interview: 115 Database information in master

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Administration Level: Advanced

Question:

Most information about each database is stored within the database.

Can you list three types of database information that live in the master database?

Answer:

Pick three of the following:

  • Database IDs, names, creation date
  • Compatibility level
  • Collation
  • Recovery model
  • Status (ONLINE, RESTORING, SUSPECT)
  • File locations and size metadata (from sys.master_files)
  • Ownership (database owner)
  • Availability Group membership
  • Replication information
  • Database GUIDs, resource IDs

2025-12-20

SQL Interview: 98 Reading tables in non-clustered index order

SQL Interview: 98 Reading tables in non-clustered index order

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Development Level: Medium

Question:

If you are SELECTing from a table and the ORDER BY clause in your query is in the same order as a non-clustered index, will the non-clustered index be used?

Answer:

It might or it might not.

2025-12-19

Book Review: DAX for Humans

Book Review: DAX for Humans

I recently received a review copy of DAX for Humans: The No CALCULATE Guide that Makes DAX Easy by Greg Deckler from my friends at PackT.

Author

Greg Deckler is the vice president of a global consulting services company. He’s a fellow Data Platform MVP and an active data community member. Greg also wrote DAX Cookbook: Over 120 recipes to enhance your business with analytics, reporting, and business intelligence .

Content

If you’ve worked with Power BI or semantic data models for any length of time, you’ve probably encountered the same challenge millions of others have: DAX is powerful… but it often feels unnecessarily difficult to learn. Much of that frustration stems from the traditional teaching approach, which centers heavily on the CALCULATE function — arguably the most complicated and unintuitive function in the entire language.

2025-12-18

SQL Interview: 97 Performance of well-formatted and laid-out SQL code

SQL Interview: 97 Performance of well-formatted and laid-out SQL code

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Development Level: Intro

Question:

A developer in your team has suggested that better formatted and laid-out SQL code will perform better?

Is this true?

Answer:

Because the optimiser reduces queries down to a format that it can work with the format of your code doesn’t make a difference. Better formatted code is more readable and maintainable though, so it’s always a good idea.

2025-12-17

SQL: Stop using db_datareader and db_datawriter

SQL: Stop using db_datareader and db_datawriter

SQL Server has a number of built-in database roles. The ones I see used the most are db_datareader and db_datawriter. They let you either read from all tables or read and write from all of them. Curiously, what has never been supplied is a db_procexecutor.

Developers and administrators who set up the use of these permissions think they are at least not using dbo or sa and while that’s true,

2025-12-16

SQL Interview: 96 Can an IDENTITY column contain duplicate values?

SQL Interview: 96 Can an IDENTITY column contain duplicate values?

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Development Level: Medium

Question:

You have created a table named dbo.Customers. The column CustomerID has been declared as

INT NOT NULL IDENTITY(1, 1)

No contraints are defined on the table.

Can the CustomerID contain a duplicate value? If so, how?

Answer:

2025-12-15

Mastering Microsoft Fabric Real-Time Intelligence Course Released

Mastering Microsoft Fabric Real-Time Intelligence Course Released

More Microsoft Fabric love !

Turn data into insights the moment it happens because yesterday’s data is already too late !

We’ve added more Microsoft Fabric love to our courses. We’re pleased to announce that our new course Mastering Microsoft Fabric Real-Time Intelligence is now available. This is another course that we’ve had so many requests for. You can find details of it here:

Mastering Microsoft Fabric Real-Time Intelligence

Do you need to master Real-Time Intelligence in Microsoft Fabric?

2025-12-14