Note that there are some explanatory texts on larger screens.

plurals
  1. POSelecting data assistance
    primarykey
    data
    text
    <p>I'm trying to display two sets of data. The first set shows the people that own complexes that have tenants in them. The second set shows people that own complexes that do not have any tenants in them.</p> <p>This is the full list of complex names:</p> <pre><code>COMPN ----- CM700 CM350 CM300 CM600 CM900 CM200 CM100 </code></pre> <p>I figured out how to filter out the ones that currently have rental agreements. I used the following command.</p> <pre><code> SELECT DISTINCT customer.custlname, customer.custfname FROM customer, own, rental WHERE own.custid = customer.custid AND rental.compname = own.compname; </code></pre> <p>Then I get the following result:</p> <pre><code>CUSTLNAME CUSTFNAME ---------- ---------- Pearson Robert Garnet Kylie Agassi Pamela </code></pre> <p>This corresponds to these values:</p> <pre><code>COMPN ----- CM350 CM900 CM200 </code></pre> <p>I am now trying to figure out how to display the people that do not have tenants in their complexes. I'm not exactly sure how to approach this. I've been messing with it for a while and I can't quite figure out the correct operator procedure to use.</p> <p>Thanks</p> <p>Additional Information about tables:</p> <p>Customer </p> <pre><code>CUSTID CUSTLNAME CUSTFNAME BDATE S MGR </code></pre> <p>CUSTID is the PK.</p> <p>Own:</p> <pre><code>CUSTID COMPNAME </code></pre> <p>CUSTID is a FK referring to table Customer. COMPNAME is a FK referring to table Complex.</p> <p>Rental:</p> <pre><code>CUSTID COMPNAME APTNUM </code></pre> <p>CUSTID is the FK referring to table Customer. COMPNAME is a FK referring to table Complex. APTNUM is a FK referring to table apartment.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload