Re: generating the average 6 months spend excluding first orders
В списке pgsql-sql по дате отправления:
| От | Ron256 |
|---|---|
| Тема | Re: generating the average 6 months spend excluding first orders |
| Дата | |
| Msg-id | 1417026875109-5828394.post@n5.nabble.com обсуждение |
| Ответ на | Re: generating the average 6 months spend excluding first orders (Ron256 <ejaluronaldlee@gmail.com>) |
| Ответы |
Re: generating the average 6 months spend excluding first orders
|
| Список | pgsql-sql |
Using the following query, SELECT o.persistent_key_str, o.ord_idFROM orders o WHERE o.ord_submitted_date in ( SELECT min(ord_submitted_date)ord_date FROM ordersgroup by persistent_key_str) I was able to generate the following output: <http://postgresql.nabble.com/file/n5828394/First_time_orders.png> The customer who placed two orders on the same date also appears in the result set. Thanks, Ron -- View this message in context: http://postgresql.nabble.com/generating-the-average-6-months-spend-excluding-first-orders-tp5828253p5828394.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера