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 to any 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.4K Product Ideas
- 1.4K Ideas Exchange
- 1.4K Connect
- 1.2K Connectors
- 284 Workbench
- 4 Cloud Amplifier
- 4 Federated
- 2.9K Transform
- 89 SQL DataFlows
- 556 Datasets
- 2.2K Magic ETL
- 3.3K Visualize
- 2.3K Charting
- 569 Beast Mode
- 11 App Studio
- 27 Variables
- 578 Automate
- 140 Apps
- 414 APIs & Domo Developer
- 23 Workflows
- 1 DomoAI
- 28 Predict
- 12 Jupyter Workspaces
- 16 R & Python Tiles
- 350 Distribute
- 90 Domo Everywhere
- 258 Scheduled Reports
- 2 Software Integrations
- 92 Manage
- 89 Governance & Security
- 9 Product Release Questions
- Community Forums
- 42 Getting Started
- 28 Community Member Introductions
- 85 Community Announcements
- 4.8K Archive