View Single Post
  #1 (permalink)  
Old 11-26-2009, 10:20 AM
Franz
Guest
 
Posts: n/a
Default difficult query...for me

Hi everybody,
I cannot figure out how to resolve this query that I am gonna describe
to you:

I have 2 tables:
CLUB
VISITS

CLUB contains many fields but the affected ones are:
idclub
number_of_visits

VISITS contains:
idvisit
type_of_visit
idclub

What I would like the query to do is:

list the CLUB table and in the "number_of_visit" field and put the COUNT
of visits for each "idclub" simply counting the rows of VISITS where
visits.idclub=club.idclub

Any suggestion about how to do it?

I did something like counting in a nested select...but i messed
everything up.

Thanks

Franz
Reply With Quote