O'Reilly logo

Greenplum - Architecture and SQL by Leona Coffing, Tom Coffing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 19 – Interrogating the Data

"The difference between genius and stupidity is that genius has its limits"

- Albert Einstein

Quiz – What would the Answer be?

image

Can you guess what would return in the Answer Set?

Using the Student_Table above, try and predict what the answer will be if this query was running on the system.

Answer to Quiz – What would the Answer be?

image

ErrorDivision by zero

You get an error when you DIVIDE by ZERO! Let’s turn the page and fix it!

The NULLIF Command

SELECT    Class_Code

,Grade_Pt / ( NULLIF (Grade_pt, 0) * ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required