-- INIT database
CREATE TABLE Product (
ProductID INTEGER PRIMARY KEY AUTOINCREMENT,
Name TEXT,
TimeScale INTEGER,
CreatedTime Integer
);
INSERT INTO Product(Name, Timescale, CreatedTime) VALUES ("foo", 1, 101);
INSERT INTO Product(Name, Timescale, CreatedTime) VALUES ("bar", 2, 1500);
-- QUERY database
SELECT Name, Timescale, CreatedTime FROM Product where (TimeScale = 1 and CreatedTime>=100) or (TimeScale=2 and createdTime>=1000)
To embed this program on your website, copy the following code and paste it into your website's HTML: