Katie Sikorski Posted February 9, 2021 Share Posted February 9, 2021 I have a Master Table and a Production Table joined in an Information Link. Is there a way to Group in a table by Operator,Gas and Oil in a table. The table right now is giving me duplicates because of the Production. So what I want to do is group the Operators, and Sum the Oil and Gas hopefully this makes sense in SQL and access you can do this by Pulling in Operator, Group Byand Sum Oil and Gas and don't pull in the Monthly Dates. Is there a way to complete this in Spotfire Below is the Query in SQL not sure how to do this in Python or Spotfire. I have atatched the Original Data and the Grouping tab is what I need. I appreciate any help in this matter as I can't find anything on Grouping in Spotfire. SELECT dbo_MASTER.OPERATOR, Sum(dbo_PRODUCTION.OIL) AS SumOfOIL, Sum(dbo_PRODUCTION.GAS) AS SumOfGAS FROM dbo_MASTER INNER JOIN dbo_PRODUCTION ON dbo_MASTER.PR.API= dbo_PRODUCTION.API WHERE (((dbo_MASTER.FIELD)="DELAWARE-NM") AND ((dbo_MASTER.RSV_CAT)="1PDP")) OR (((dbo_MASTER.FIELD)="DELAWARE-TX") AND ((dbo_MASTER.RSV_CAT)="1PDP")) GROUP BY dbo_MASTER.OPERATOR ORDER BY Sum(dbo_PRODUCTION.OIL), Sum(dbo_PRODUCTION.GAS) DESC; Link to comment Share on other sites More sharing options...
Kirsten Smith (she/her) Posted February 9, 2021 Share Posted February 9, 2021 You created a cross table to get the desired visualization of your data Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now