Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
SELECT * FROM Accounts WHERE ID [b]NOT IN[/b] (SELECT Account_ID FROM Items)
SELECT * FROM Accounts WHERE ID NOT IN (SELECT Account_ID FROM Sale)
CREATE CURSOR crsAccounts (ID I Autoinc, Username Char(20))
CREATE CURSOR crsProducts (ID I Autoinc, Productname Char(20))
CREATE CURSOR crsOrders (ID I Autoinc, AccountID I)
CREATE CURSOR crsOrderItems (ID I Autoinc, OrderID I, ProductID I, Amount I)
INSERT INTO crsAccounts (Username) VALUES ('user1')
INSERT INTO crsAccounts (Username) VALUES ('user2')
INSERT INTO crsProducts (Productname) VALUES ('product1')
INSERT INTO crsProducts (Productname) VALUES ('product2')
INSERT INTO crsProducts (Productname) VALUES ('product3')
INSERT INTO crsProducts (Productname) VALUES ('product4')
INSERT INTO crsOrders (AccountID) VALUES (1)
INSERT INTO crsOrderItems (OrderID, ProductID, Amount) VALUES (1,1,1)
INSERT INTO crsOrderItems (OrderID, ProductID, Amount) VALUES (1,3,2)
INSERT INTO crsOrders (AccountID) VALUES (2)
INSERT INTO crsOrderItems (OrderID, ProductID, Amount) VALUES (2,2,4)
INSERT INTO crsOrderItems (OrderID, ProductID, Amount) VALUES (2,3,1)
SELECT Prd.ID as ProductID, Acc.ID As AccountID;
FROM crsProducts Prd ;
FULL JOIN crsAccounts Acc ON .T. ;
LEFT JOIN crsOrderItems Itm ON Itm.ProductID = Prd.ID ;
LEFT JOIN crsOrders Ord ON Itm.OrderID = Ord.ID AND Ord.AccountID = Acc.ID ;
WHERE Prd.ID = 2;
GROUP BY Prd.ID, Acc.ID;
Having COUNT(Ord.ID) = 0 ;
INTO CURSOR crsResults