apache_beam.testing.benchmarks.nexmark.queries.query6 module¶
Query 6, ‘Average Selling Price by Seller’. Select the average selling price over the last 10 closed auctions by the same seller. In CQL syntax:
SELECT Istream(AVG(Q.final), Q.seller)
FROM (SELECT Rstream(MAX(B.price) AS final, A.seller)
FROM Auction A [ROWS UNBOUNDED], Bid B [ROWS UNBOUNDED]
WHERE A.id=B.auction
AND B.datetime < A.expires AND A.expires < CURRENT_TIME
GROUP BY A.id, A.seller) [PARTITION BY A.seller ROWS 10] Q
GROUP BY Q.seller;
- apache_beam.testing.benchmarks.nexmark.queries.query6.load(events, metadata=None, pipeline_options=None)[source]¶