Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 997029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:58:05+00:00 2026-05-16T06:58:05+00:00

I have the following tables: CREATE TABLE `attendance_event_attendance` ( `id` int(11) NOT NULL AUTO_INCREMENT,

  • 0

I have the following tables:

CREATE TABLE `attendance_event_attendance` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`talk_id` varchar(200) NOT NULL,
`membersAttended_id` varchar(200) NOT NULL,
PRIMARY KEY (`id`),
KEY `attendance_event_attendance_9ace4e5a` (`talk_id`),
KEY `attendance_event_attendance_3c0dadb7` (`membersAttended_id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

CREATE TABLE `attendance_member` (
`name` varchar(200) NOT NULL,
`telephone_number` varchar(200) NOT NULL,
`email_address` varchar(200) NOT NULL,
`membership_type` varchar(1) NOT NULL,
`membership_number` varchar(200) NOT NULL,
PRIMARY KEY (`membership_number`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `attendance_talk` (
`title` varchar(200) NOT NULL,
`speaker` varchar(200) NOT NULL,
`date_of_talk` date NOT NULL,
PRIMARY KEY (`title`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1; 

I want to select all the members that have not attended the two latest talks. The query I have written looks like this:

SELECT m.name 
  from attendance_member as m 
left outer join attendance_event_attendance as ea on (ea.membersAttended_id=m.membership_number) 
join attendance_talk as t on (ea.talk_id = t.title) 
where t.date_of_talk >= 2010-06-01 
  AND ea.membersAttended_id = null;

Is this correct? Or have I not understood joins correctly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T06:58:06+00:00Added an answer on May 16, 2026 at 6:58 am

    A somewhat horrible approach, I fear – but one that should work…

    SELECT m.name 
    from attendance_member as m 
    left outer join (
     SELECT ea.membersAttended_id
     FROM attendance_event_attendance as ea
     join attendance_talk as t on (ea.talk_id = t.title) 
     where t.date_of_talk >= 2010-06-01
     GROUP BY ea.membersAttended_id
     HAVING COUNT(*) = 2
    ) attendingmembers
    ON attendingmembers.membersAttended_id = m.membership_number
    WHERE attendingmembers.membersAttended_id IS NULL
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following tables CREATE TABLE `files` ( `fileid` int(11) NOT NULL AUTO_INCREMENT,
Say I have the following 2 tables, CREATE TABLE t1( name VARCHAR(25) NOT NULL,
With the following tables CREATE TABLE `Play` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id`
I have the following table structure CREATE TABLE `table` ( `id` int(11) NOT NULL
Suppose I have the following tables: CREATE TABLE Game ( GameID INT UNSIGNED NOT
I have the following tables; CREATE TABLE IF NOT EXISTS `tags` ( `tag_id` int(11)
I have the following mysql tables: CREATE TABLE `video` ( `video_id` int(11) unsigned NOT
I have the following two tables defined... CREATE TABLE [LogLevel] ( [Id] int primary
i have following 3 tables CREATE TABLE [dbo].[dspartner]( [dspartnerid] [bigint] IDENTITY(1,1) NOT NULL, [name]
I have the following dump: CREATE TABLE `testdata`.`carer` ( `ID` bigint(20) NOT NULL auto_increment,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.