Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Jun 2018
    Posts
    10
    Member #
    59288

    How do I calculate how many each number originally in the first table met once?

    There are two tables, for example telephones, the second is names. Join each other via Left join. Accordingly, the records are duplicated. how to calculate how many each number was originally in the first table met once?
    XoXo 22coders

  2.  

  3. #2
    Junior Member
    Join Date
    Aug 2019
    Posts
    22
    Member #
    60927
    Liked
    6 times
    This is one way to do this:

    WITH list AS (SELECT x FROM table 1)
    SELECT count(y) FROM table2 WHERE tel IN (SELECT * FROM list)

    Please post your attempts so far in order to understand your question better.
    Last edited by sibert; Sep 15th, 2019 at 09:42 AM.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:00 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com