How can I find in SQLite all the persons who share the same address as another person

amanloop

I have a table with clients and I'm trying to create a query which returns all the persons who have the same address as -say- John.

example

Name Address

John 22 Acacia Avenue

Mary 22 Acacia Avenue

Leo 12 Nowhere street

Jake 22 Acacia Avenue

Cindy 43 Leeds street

Tom 78 Abbey Road

So, by looking for John, I'd get as a result

Name Address

John 22 Acacia Avenue

Mary 22 Acacia Avenue

Jake 22 Acacia Avenue

I hope that's clear enough. I'm using SQLite 3.33 , thanks!

Schwern

You can do this using a subquery.

select *
from people
where address = (
  select address
  from people
  where name = 'John'
)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Find persons with connection to other person

From Dev

Find persons with connection to other person

From Dev

In postgres how can I delete all columns that share the same prefix

From Dev

How can I get the username of the person who triggered a build in Bamboo?

From Dev

How can I get all fields with same schema using find()?

From Dev

How can I find all arrays with the same values?

From Dev

How can I share a directory with an another user?

From Dev

How can I share a directory with an another user?

From Dev

Can I fork another persons repo twice into my own account?

From Dev

How can I lock a person who gives a particular gesture and might go out of sight in Kinect?

From Dev

How to select every pair of persons who work in the same firm and know each other?

From Dev

How can I find the address of a String Literal?

From Dev

How can I find the IP address in a string

From Dev

How can I find the MAC address of a client on the same network, using Python-Flask?

From Dev

How can I find the MAC address of a client on the same network, using Python-Flask?

From Dev

How can I find the tcp address for another computer to transfer over ethernet?

From Dev

How can I get the count of ids who are using same name

From Dev

How can I define a variable in a controller who is from another file?

From Dev

Can multiple visitors share the same IP address?

From Dev

How can I find who pushed a tag(s) to BitBucket

From Dev

How can i use tensorflow object detection to only detect persons?

From Dev

How can I quickly switch between different "Chrome Persons"?

From Dev

How can I find all columns A whose subcategories B are all related to the same column C?

From Dev

How do I find values that share the same keys in a dictionary?

From Dev

How to share same address for multiple endpoints

From Java

How can I find which column contains the same value as another specified column in R?

From Dev

How can I share working repository with another user (push/pull)?

From Dev

How can I share Array from one Controller to another

From Dev

How can I animate one View after another instead of all at the same time?

Related Related

  1. 1

    Find persons with connection to other person

  2. 2

    Find persons with connection to other person

  3. 3

    In postgres how can I delete all columns that share the same prefix

  4. 4

    How can I get the username of the person who triggered a build in Bamboo?

  5. 5

    How can I get all fields with same schema using find()?

  6. 6

    How can I find all arrays with the same values?

  7. 7

    How can I share a directory with an another user?

  8. 8

    How can I share a directory with an another user?

  9. 9

    Can I fork another persons repo twice into my own account?

  10. 10

    How can I lock a person who gives a particular gesture and might go out of sight in Kinect?

  11. 11

    How to select every pair of persons who work in the same firm and know each other?

  12. 12

    How can I find the address of a String Literal?

  13. 13

    How can I find the IP address in a string

  14. 14

    How can I find the MAC address of a client on the same network, using Python-Flask?

  15. 15

    How can I find the MAC address of a client on the same network, using Python-Flask?

  16. 16

    How can I find the tcp address for another computer to transfer over ethernet?

  17. 17

    How can I get the count of ids who are using same name

  18. 18

    How can I define a variable in a controller who is from another file?

  19. 19

    Can multiple visitors share the same IP address?

  20. 20

    How can I find who pushed a tag(s) to BitBucket

  21. 21

    How can i use tensorflow object detection to only detect persons?

  22. 22

    How can I quickly switch between different "Chrome Persons"?

  23. 23

    How can I find all columns A whose subcategories B are all related to the same column C?

  24. 24

    How do I find values that share the same keys in a dictionary?

  25. 25

    How to share same address for multiple endpoints

  26. 26

    How can I find which column contains the same value as another specified column in R?

  27. 27

    How can I share working repository with another user (push/pull)?

  28. 28

    How can I share Array from one Controller to another

  29. 29

    How can I animate one View after another instead of all at the same time?

HotTag

Archive