'I need to be able to count by hour the first iteration of each unique story

I get data from our CMS that shows all actions of staff within that system. My challenge is to be able to show in a chart only the first iteration of each story as published and the hour in which it occurred. A single story can be published multiple times during a day. Using countuniquesif I can get the number of unique stories per hour by using:

=COUNTUNIQUEIFS(Sheet0!I2:I60000,Sheet0!G2:G60000,"NL_Stories/Ready",Sheet0!E2:E60000,"Webpub",Sheet0!B2:B60000,"08") 

=COUNTUNIQUEIFS(Sheet0!I2:I60000,Sheet0!G2:G60000,"NL_Stories/Ready",Sheet0!E2:E60000,"Webpub",Sheet0!B2:B60000,"09")

Etc

However, if that story is published in the period from 8am-9am (08 in column B), if it is published again between 9am-10am (09 in column B) it will be counted again. How can I limit this to just the first time it is published and excluded in any of the other hours. I have attached a spreadsheet with two tabs, one with the raw data and two with what I currently do.

Any assistance appreciated

https://docs.google.com/spreadsheets/d/1V-kZyUUfXtaf6pMYDCxNSUjjWclOrUcW2Pk2y678RZo/edit?usp=sharing



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source