Adrenaline Dataflow: Inequality Correlated Subqueries Unsupported
Hello,
I'm attempting to perform a correlated subquery using an inequality as shown in the below example.
SELECT a."Opportunity ID", a."Owner ID", a."Created Date", a."Close Date", a."Snapshot Date", a."Last Modified Date", a."Next Step", a."Competitor", a."Amount", a."Stage", (SELECT COUNT("Opportunity ID") FROM "pushes" WHERE a."Opportunity ID" = pushes."Opportunity ID" AND pushes."Change Date" <= a."Snapshot Date") AS "Push Count" FROM "pipeline_snapshots_min_cols" "a"
Unfortunately this is not supported in Adrenaline dataflows. I need to use Adrenaline though because the dataset has ~ 80 million rows and other methods take too long to process. Does anyone know of a different way that I could achieve the same results?
Thanks!
0
Answers
-
I don't have a good dataset to test this with, but I wonder if this would work:
SELECT a."Opportunity ID", a."Owner ID", a."Created Date", a."Close Date", a."Snapshot Date", a."Last Modified Date", a."Next Step", a."Competitor", a."Amount", a."Stage", COUNT(pushes."Opportunity ID") AS "Push Count" FROM "pipeline_snapshots_min_cols" "a" LEFT JOIN "pushes" ON a."Opportunity ID" = pushes."Opportunity ID" AND pushes."Change Date" <= a."Snapshot Date" GROUP BY a."Opportunity ID", a."Owner ID", a."Created Date", a."Close Date", a."Snapshot Date", a."Last Modified Date", a."Next Step", a."Competitor", a."Amount", a."Stage"
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
I have found these sub-selects very finicky in Adrenaline. a recent one I am working on will not preview but will run without error. I opened a ticket, so we shall see.
0
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 306 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3K Transform
- 112 SQL DataFlows
- 649 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 788 Beast Mode
- 78 App Studio
- 43 Variables
- 745 Automate
- 187 Apps
- 475 APIs & Domo Developer
- 67 Workflows
- 16 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 406 Distribute
- 117 Domo Everywhere
- 279 Scheduled Reports
- 10 Software Integrations
- 139 Manage
- 136 Governance & Security
- 8 Domo Community Gallery
- 46 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 113 Community Announcements
- 4.8K Archive