Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. pat1234

    Counting customers with special history in SQL

    no this does not work . I have got a syntax error on FROM clause.
  2. pat1234

    Counting customers with special history in SQL

    thanks to all it works fine. May i ask you one more thing? I 'd like to find in a single query the number of customer grouped by their last purchase_id before a certain date. That is I want to have eg : - 1200 cutomers whose last purchase_id='X' - 800 cutomers whose last purchase_id='Y' and so...
  3. pat1234

    Counting customers with special history in SQL

    hello i've a CUSTOMERS table (customer_id) and a PURCHASES table (customer_id, purchase_date,purchase_id) I'm trying to count the number of customers who bought purchase_id = X and, in the 12 months before buying X, also bought at least twice purchase_id = Z. Any idea ? Thanks in advance Patrick

Part and Inventory Search

Back
Top