aggregate query

  • Thread starter Thread starter JRough
  • Start date Start date
J

JRough

I need to do an aggregate query on the volume field. I'm really not
sure if I'm doing it right. The query2 has some filters. THANKS.

SELECT permno, name, sum(vol)
FROM myTable
WHERE permNo IN(query2)
Group BY PermNo
 
Your query here does not know (query2) or what field in the query to compare
with.
Try this ---
SELECT permno, name, sum(vol)
FROM myTable, query2
WHERE permNo = [query2].[SomeFieldName]
Group BY PermNo, name
 
Your query here does not know (query2) or what field in the query to compare
with.
Try this ---
SELECT permno, name, sum(vol)
FROM myTable, query2
WHERE permNo = [query2].[SomeFieldName]
Group BY PermNo, name

--
KARL DEWEY
Build a little - Test a little

JRough said:
I need to do an aggregate query on the volume field. I'm really not
sure if I'm doing it right. The query2 has some filters. THANKS.
SELECT permno, name, sum(vol)
FROM myTable
WHERE permNo IN(query2)
Group BY PermNo

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top