Re: need some SQL help
- From: "howzat" <dave@xxxxxxxx>
- Date: Thu, 29 Dec 2005 17:02:12 GMT
"Hugo Kornelis" <hugo@xxxxxxxxxxxxxxxxxxxxxx> wrote in message >
> SELECT customer_id
> FROM (SELECT customer_id, order_type
> FROM orders
> WHERE order_type IN (3, 4)
> GROUP BY customer_id, order_type
> HAVING ( order_type = 3 AND SUM(amount) > 100)
> OR ( order_type = 4 AND SUM(amount) > 200) ) AS derived
> GROUP BY customer_id
> HAVING COUNT(*) = 2
>
hugo, do you know how I'd modify your query to return only a count of the
matching rows? I've tried various changes but I'm really just clutching at
straws.
.
Relevant Pages
- Re: Query permissions
... Copy the sql from each query for the form and subforms and put the sql in the ... Now Hugo and the Admins group can read, edit, add and delete records in the ... I want all users to have read permissions to the data in these forms. ... I've given read, update, modify and delete permissions on each query to the ... (microsoft.public.access.security) - Query permissions
... I want all users to have read permissions to the data in these forms. ... tables and given Read permissions to my custom users group for each query. ... I've given read, update, modify and delete permissions on each query to the ... group called HugosGroup, and Hugo is the only member of that group (except ... (microsoft.public.access.security) - modify a field value of all the group records
... I have seen that on a table given by a query that groups and counts ... records with field of same values, is not possible to modify a value ... Regards ... Prev by Date: ... (microsoft.public.access.queries) - Re: MS Access 2003 problem
... is why Admin has no problem. ... The user should modify a query. ... Prev by Date: ... (comp.databases.ms-access) - Re: Date Query
... i need a formula so i can put into my query Or is it possible to modify the ... SJJ ... Prev by Date: ... (microsoft.public.access.queries) |
|