Note that there are some explanatory texts on larger screens.

plurals
  1. POSQL add up rows in a column
    primarykey
    data
    text
    <p>I'm running SQL queries in Orion Report Writer for Solarwinds Netflow Traffic Analyzer and am trying to add up data usage for specific conversations coming from the same general sources. In this case it is netflix. I've made some progress with my query.</p> <pre><code>SELECT TOP 10000 FlowCorrelation_Source_FlowCorrelation.FullHostname AS Full_Hostname_A, SUM(NetflowConversationSummary.TotalBytes) AS SUM_of_Bytes_Transferred, SUM(NetflowConversationSummary.TotalBytes) AS Total_Bytes FROM ((NetflowConversationSummary LEFT OUTER JOIN FlowCorrelation FlowCorrelation_Source_FlowCorrelation ON (NetflowConversationSummary.SourceIPSort = FlowCorrelation_Source_FlowCorrelation.IPAddressSort)) LEFT OUTER JOIN FlowCorrelation FlowCorrelation_Dest_FlowCorrelation ON (NetflowConversationSummary.DestIPSort = FlowCorrelation_Dest_FlowCorrelation.IPAddressSort)) INNER JOIN Nodes ON (NetflowConversationSummary.NodeID = Nodes.NodeID) WHERE ( DateTime BETWEEN 41539 AND 41570 ) AND ( (FlowCorrelation_Source_FlowCorrelation.FullHostname LIKE 'ipv4_1.lagg0%') ) GROUP BY FlowCorrelation_Source_FlowCorrelation.FullHostname, FlowCorrelation_Dest_FlowCorrelation.FullHostname, Nodes.Caption, Nodes.NodeID, FlowCorrelation_Source_FlowCorrelation.IPAddress </code></pre> <p>So I've got an output that filters everything but netflix sessions (Full_Hostname_A) and their total usage for each session (Sum_Of_Bytes_Transferred)</p> <p>I want to add up Sum_Of_Bytes_Transferred to get a total usage for all netflix sessions listed, which will output to Total_Bytes. I created the column Total_Bytes, but don't know how to output a total to it.</p> <p>For some asked clarification, here is the output from the above query:</p> <p><img src="https://i.stack.imgur.com/jTDjz.jpg" alt="enter image description here"></p> <p>I want the Total_Bytes Column to be all added up into one number.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload