I can teach you Yellowbrick analytics!  I have never seen a database do analytics better faster Yellowbrick.  Since Yellowbrick is an Analytic Leader, I thought we should work on the analytic called LEAD. You use a LEAD to place the next row’s value on the answer set’s current line.  You can then see today’s value, and on the same line, see tomorrow’s value.    

You will see an ORDER BY statement in each example, but it will not come at the end of the query.  The ORDER BY keywords is always within the Lead calculation.  It is the ORDER BY statement that runs first, and once the system orders the data, the Lead will calculate.  The initial ordering of the data set gives these analytics the name “Ordered Analytics.” The other name is “Window Functions,” because they calculate within a specific window of rows. Let me summarize the Lead in the picture below.  Order the data first by the column Sale_Date and after the data sorts, then begin with row one and ask, “Can we get the Daily_Sales value from the next row, and add it to the current line?” If the answer is “Yes,” then do it, but if the answer is “No,” then put in a Null.

The LEAD above allows you to see the Daily_Sales for today next to tomorrow’s value.

Check out the next picture below.  Notice we have LEAD(daily_sales,2) statement.  The number 2 means that the analytic will take the daily_sales value two rows down.  In our previous example, we did not see any number in the LEAD statement, so it defaults to a LEAD of one.

You can put any number (n) in the moving window, and that tells Yellowbrick to get the value n rows down.

Now, we are going to take the next example even farther by adding a PARTITION BY statement. The PARTITION BY resets the calculation and acts much like a GROUP BY statement.  Notice that each Product_ID calculates within the Product_ID only.  When a new Product_ID appears, the calculation starts over.

In the picture above, notice the null values.  They appear because there are no rows after available.  We have run out of future row values to display. 

In the example below, we have a LEAD(daily_sales, 2) statement again, showing the daily_sales value that is two rows down on the current line.  Plus, we have a PARTITION BY product_id, which resets the calculation when the system sees a new product_id.  

If you want to move data from any system to Yellowbrick, you should use the Nexus and NexusCore Server for the data movement.  You can move these systems to Yellowbrick:

  • Teradata
  • Oracle
  • SQL Server
  • DB2
  • Greenplum
  • Redshift
  • Azure SQL Data Warehouse
  • Postgres
  • MySQL
  • Netezza
  • Snowflake

Below is an example of how pretty and easy-to-use the NexusCore Server is to move data from another system to Yellowbrick.  Below is an example of how stunning and easy-to-use the NexusCore Server is to transfer data from another system to Yellowbrick.  You can run this job immediately, or you can schedule it daily, weekly, monthly, yearly, or custom.

If you want to move data to Yellowbrick or use the most fantastic query tool known to humankind, use the Nexus.  Download your free Nexus trial at www.CoffingDW.com.

Watch the video of the Nexus moving data to Yellowbrick and all other systems. Watch the video: https://youtu.be/mqNQ65H7lps

I hope you enjoyed today’s Yellowbrick analytic lesson.  See you next week. 

Yellowbrick – The only modern data warehouse for hybrid cloud

Yellowbrick is the world’s only modern data warehouse for hybrid cloud. Enterprises rely on Yellowbrick to do the impossible in data analytics: get answers to the most challenging business questions for improved profitability, better customer loyalty, and faster innovation in near real-time, and at a fraction of the cost of alternatives.

Yellowbrick offers superior price/performance for thousands of concurrent users on petabytes of data, along with the unique ability to run analytic workloads on-premises, in a private cloud, and/or any public cloud and manage them in a simple, consistent way–all with predictable pricing via an annual subscription. Learn more at www.yellowbrick.com.

I hope you enjoyed today’s Yellowbrick analytic lesson.  See you next week. 

Thank you,


Tom Coffing
CEO, Coffing Data Warehousing
Direct: 513 300-0341
Website: www.CoffingDW.com
YouTube channel: CoffingDW
Email: Tom.Coffing@CoffingDW.com