Plotting tags by time

Hi All,

I’ve been collecting some sales data for a while with a tag of “orderID” and fields of “itemName”, “itemValue”. There can be several items in a single order so for example running this in chrongraf:

SELECT “itemName”, “itemValue” FROM “orderlist”.“autogen”.“orders” WHERE time > :dashboardTime: AND “orderID” = “DJ0492342”

returns a list of items included in that order.

SELECT count(“itemName”) AS “count_itemName” FROM “orderlist”.“autogen”.“orders” WHERE time > :dashboardTime: GROUP BY time(:interval:) FILL(null)

gives me a nice graph showing how many items have been sold. Someone has now asked to see a graph of numbers of orders rather than numbers of items. How do I plot a count of the orderIDs over time?

Thanks!

I believe that OrderIDs would need to be a field in order for you to do that. It’s possible you could do this with Flux though, although I’m not sure how just yet. Maybe sign up for the Flux Office Hours and come ask the question there!

dg

Thanks, yes I thought that might be the answer. I’m now storing the order ID as a tag and as a field.