One of these days I will maybe understand...

Using MYSQL 4.0.13, debian linux

create table members (
        id unsigned int autoincrement,
        name
)

create table activity (
        id unsigned int autoincrement,
        description
)

create table history (
        id unsigned in autoincrement,
        date date,
        member_id unsigned int,
        activity unsigned int
)

What I need:
        1) only records for a particular date
        2) there should be at least one record for each activity
        3) there may be multiples of the same activity on a given date
        4) there may be multiples of the same member on a given date
        5) not all members will be listed
        6) the members.name result field may be NULL

SELECT history.date, activity.description, members.name
???
WHERE history.date = 'YYYY-MM-DD'

-- 
"A little inaccuracy sometimes saves tons of explanation."
                -- H. H. Munro (Saki)
    Rick Pasotto    [EMAIL PROTECTED]    http://www.niof.net

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to