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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:26:24+00:00 2026-06-05T10:26:24+00:00

Hey I don’t know how to do it…. Its a homework: List the code

  • 0

Hey I don’t know how to do it….

Its a homework: List the code and the consumers who bought cars only ‘Argentina’ country.

Table sell:
customer | resell  | veicle    |    date    |  value
---------+---------+-----------+------------+----------
 02      | 01      | 03        | 2010-02-05 | 17500.00
 04      | 02      | 01        | 2010-01-07 | 28000.00
 01      | 03      | 08        | 2010-02-15 | 28000.00
 02      | 03      | 02        | 2010-03-12 | 42000.00
 03      | 04      | 06        | 2010-02-06 | 11500.00
 03      | 02      | 05        | 2010-01-25 | 22100.00
 01      | 01      | 04        | 2010-01-21 | 15500.00

Table customer:

 cod    |    name    | lastname
--------+------------+------------
 01     | Jose       | Alves
 02     | Paulo      | Cunha
 03     | Maria      | DPaula
 04     | Joana      | Silveria

Table veicle:

 cod    |manufacturer|     model       | year |  country  |  price
--------+------------+-----------------+------+-----------+----------
 01     | 01         | Gol             | 2000 | Brasil    | 25000.00
 02     | 01         | Golf            | 2005 | Argentina | 39000.00
 03     | 04         | Ford Ka         | 1990 | Brasil    | 15000.00
 04     | 03         | Corsa Seda      | 1995 | Brasil    | 12500.00
 05     | 04         | Fiesta          | 2003 | Argentina | 20000.00
 06     | 03         | Corsa Seda      | 1995 | Argentina | 10000.00
 07     | 05         | Palio           | 2002 | Brasil    | 15000.00
 08     | 05         | Siena           | 2006 | Brasil    | 26000.00

I guess it to start:

SELECT customer.cod, customer.name 
FROM sell, customer 
WHERE (SELECT cod 
        FROM veicle 
        WHERE veicle.country = 'Argentina') = sell.veicle;

To select only the argentine cars…
Please guide-me to the answer.

  • 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-05T10:26:25+00:00Added an answer on June 5, 2026 at 10:26 am
    SELECT c.*
    FROM   customer c
    WHERE EXISTS (
        SELECT 1
        FROM   sell s
        JOIN   veicle v ON v.cod = s.veicle
        WHERE  s.customer = c.cod
        AND    v.country = 'Argentina'
        )
    AND NOT EXISTS (
        SELECT 1
        FROM ...
        );
    

    I’ll leave the rest for you, as this is homework. Fill in for ... to exclude customers that have bought vehicles that are not from Argentina – very similar to the first EXISTS clause. If you have understood the first, you can complete the rest.

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

Sidebar

Related Questions

Hey, I don't have any code because I don't know how to do this.
Hey guys. I don't know much JS, but I wanted to do some quick
Hey, well I don't really know how to describe this but here's my current
Hey guys, I want to parse some xml but I don't know how I
Hey all, I don't know how to properly phrase this but when I run
Hey experts, actually it's a pretty simple question...just don't know about the answer. I
Hey this is my first time trying anything like so I don't know if
Hey I want to reset the form but i don't know how. i mean
Hey, I'm having some trouble with this problem, and I don't even know where
Hey guys, I don't know RegExp yet. I know a lil about it but

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.