Dashboards

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting 1-M or Cartisean Product in Query Results

Getting 1-M or Cartisean Product in Query Results

Hello, 

I'm running what I believe are some very simple queries against the errors in the transactions table, but I'm getting 1-Many or Cartisean Product sums when I try and group them.  The queries are listed below.  There appear to be 150,241 actual records in the transaction table that meet the query's Where conditions, but when I Group them, the results total 399,181.

 

The ultimate get an ErrorCode count by Business Transaction and by Hour (Query 4) but I can't seem to get the correct results.  

 

Can someone please provide an explanation as to why this is occurring and how I can write the query to get the proper results matching the 150,241 errors?

 

Thank you

 

Mark

 

Query 1 - a simple count query

SELECT count(*) AS "Errors" FROM transactions WHERE application = "Internet Business-2017-Prod" AND (segments.httpData.url is not NULL AND segments.httpData.url NOT LIKE "*aggregators*") AND segments.errorList.errorCode IS NOT NULL LIMIT 10000
Errors Counted 150241

 

Query 2 - count by ErrorCode

SELECT segments.errorList.errorCode, count(*) AS "Errors" FROM transactions WHERE application = "Internet Business-2017-Prod" AND (segments.httpData.url is not NULL AND segments.httpData.url NOT LIKE "*aggregators*") AND segments.errorList.errorCode IS NOT NULL LIMIT 10000
Records 121
Errors 399181

 

Query 3 - count by Business Transaction and ErrorCode

SELECT transactionName AS "Business Transaction", segments.errorList.errorCode AS "ErrorCode", count(*) AS "Errors" FROM transactions WHERE application = "Internet Business-2017-Prod" AND (segments.httpData.url is not NULL AND segments.httpData.url NOT LIKE "*aggregators*") AND segments.errorList.errorCode IS NOT NULL LIMIT 10000, 10000
Records 359
Errors 399181

 

Query 4 - count by Hour, Business Transaction, and ErrorCode

SELECT series(eventTimestamp, '1h') AS "DateTime", transactionName AS "Business Transaction", segments.errorList.errorCode AS "ErrorCode", count(*) AS "Errors" FROM transactions WHERE application = "Internet Business-2017-Prod" AND (segments.httpData.url is not NULL AND segments.httpData.url NOT LIKE "*aggregators*") AND segments.errorList.errorCode IS NOT NULL LIMIT 10000, 10000, 10000
Records 359
Errors 399181

Getting 1-M or Cartisean Product in Query Results