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

  • Home
  • SEARCH
  • 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 8792445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:58:47+00:00 2026-06-13T22:58:47+00:00

Here is the simple question to gain some medals :) : I have three

  • 0

Here is the simple question to gain some medals 🙂 :
I have three tables:
“contacts” that holds the contacts information where each entry has a unique id.
The second table “groups” where is stores the name for each group and the group id.
The last “contacts_groups” binds each contact to a group, it has just two columns, contact_id and group_id.

The question is how do write in a single statement a MySQL query that will select all contacts that are not assigned to a group. In other words contacts which id is not listed in “contacts_groups” table?

  • 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-06-13T22:58:48+00:00Added an answer on June 13, 2026 at 10:58 pm
    select * from contacts c
    left outer join contacts_groups cg on c.id = cg.contact_id 
    where cg.contact_id is null
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Simple question here. I have a C# program which needs to stores some files
Here's a simple question. I have a jqGrid that's working great but I want
I have a hopefully pretty simple question here. I'm converting some Access SQL script
Very simple question here. I have a double that I wish to convert back
I got a simple question here Let's suppose we have a codebase that employs
Here's a very simple question. I have an SP that inserts a row into
I'm trying to learn WPF, so here's a simple question, I hope: I have
Well simple question here (maybe not a simple answer?) Say I have a two
here is a simple question. I have a 'ul' which i have made sortable
I have a simple question here. Is there a difference between passing a variable

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.