Custom functions used in Google Sheets for ease of use and improved functionality.
SELECT table1.a, table1.b FROM table1 WHERE EXISTS
(select * from table2 where table1.a = table2.a)
=gsSQL("select * from customers where exists (SELECT * FROM booksales WHERE booksales.customer_id = customers.id) and email like '%gmail.com'")
CUSTOMERS.ID | CUSTOMERS.NAME | CUSTOMERS.ADDRESS | CUSTOMERS.CITY | CUSTOMERS.PHONE | CUSTOMERS.EMAIL |
---|---|---|---|---|---|
C1 | Numereo Uno | 101 One Way | One Point City | 9051112111 | bigOne@gmail.com |
C2 | Dewy Tuesdays | 202 Second St. | Second City | 4162022222 | twoguys@gmail.com |
select * from customers where not exists
(SELECT * FROM booksales WHERE booksales.customer_id = customers.id)