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 791687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:52:38+00:00 2026-05-14T21:52:38+00:00

Updates : Please see below i have table: data +———————–+————–+———–+ | State | d_country

  • 0

Updates : Please see below

i have table: data

+-----------------------+--------------+-----------+
| State                 | d_country    | d_postcode|
+-----------------------+--------------+-----------+
| State1                | Country1     |      1111 | 
| State2                | Country2     |      2222 | 
| State3                | Country3     |      3333 | 
| State4                | Country4     |      4444 | 
+-----------------------+--------------+-----------+

And another table: user

+-----------------------+--------------+-----------+
| Name                  | u_country    | u_postcode|
+-----------------------+--------------+-----------+
| Name1                 | Country3     |      3333 | 
| Name2                 | Country5     |      5555 | 
| Name3                 |              |      6666 | 
| Name4                 | Country6     |      6666 | 
| Name5                 | Country6     |      6666 | 
+-----------------------+--------------+-----------+

What SQL should i use to:


Determine the number (count) of country that are not listed on table data. For example u_postcode is not listed in d_postcode is 5555 and 6666. It will return 2.

List down name and what country not available in table data yet.

Updates

  1. I want to use grouping to filter postcode and make Name3 and Name4 as different rows.

For example:

    +-----------------------+--------------+-----------+
    | Name                  | u_country    | u_postcode|
    +-----------------------+--------------+-----------+ 
    | Name2                 | Country5     |      5555 | 
    | Name3                 |              |      6666 |
    | Name4                 | Country6     |      6666 | 
    +-----------------------+--------------+-----------+

Any possible idea?

Remarks: Corrected myself

SELECT DISTINCT Name, u_country, u_postcode FROM user 
WHERE u_postcode NOT IN (SELECT d_postcode FROM data) 
  • 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-14T21:52:39+00:00Added an answer on May 14, 2026 at 9:52 pm

    Try this.

    SELECT Name, u_country, u_postcode FROM user 
    WHERE u_postcode NOT IN (SELECT d_postcode FROM data)
    

    Hope it helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 related Linq to SQL questions. Please see the image below to
Note, I have found the solution to my problem. Please see below. I'm converting
Please have a look at the schema below: CREATE TABLE Person (id int not
--> Please see updates at the bottom, I have replicated the same issue in
UPDATE: Please see the updates below, as I'm adding more information to the bottom
Update: Please see below; I have removed all abstraction and created a plain PHP
I have a table and contained data show below, it's called TABLE_A +++++++++++++++++++++++++++++++++++++++++++++ PrimaryID
Please look at : http://news.bbc.co.uk/2/hi/europe/8592380.stm The content updates automatically, however, I can't see it
Please see below code snippt: <?php //Sets the update and indicator elements by DOM
**Updated: (See below)**I have been looking around for couple of days and can't find

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.