8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58f882d commit a1c68b4Copy full SHA for a1c68b4
doc/src/sgml/queries.sgml
@@ -1,4 +1,4 @@
1
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/queries.sgml,v 1.1 2001/01/22 23:34:33 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/queries.sgml,v 1.2 2001/02/01 19:13:47 momjian Exp $ -->
2
3
<chapter id="queries">
4
<title>Queries</title>
@@ -531,7 +531,7 @@ SELECT pid AS "Products",
531
p.name AS "Over 5000",
532
(sum(s.units) * (p.price - p.cost)) AS "Past Month Profit"
533
FROM products p LEFT JOIN sales s USING ( pid )
534
- WHERE p.date > CURRENT_DATE - INTERVAL '4 weeks'
+ WHERE s.date > CURRENT_DATE - INTERVAL '4 weeks'
535
GROUP BY pid, p.name, p.price, p.cost
536
HAVING p.price > 5000;
537
</programlisting>
0 commit comments