Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
2
CREATE TABLE StoreCustomers( date text, name VARCHAR(100), product CHAR(10), price INT CHECK(price>0), id INT PRIMARY KEY ); INSERT INTO StoreCustomers VALUES ('11 August 2020', 'Gifted', 'potatoes',10, 1), ('11 August 2020', 'Bevin', 'apples', 8, 2), ('12 August 2020', 'Debra', 'bananas', 5, 3), ('12 August 2020', 'Tim', 'beans', 15, 4), ('12 August 2020', 'Brian', 'oranges', 5, 5), ('13 August 2020', 'Kuku', 'mango', 7, 6), ('14 August 2020', 'Ray', 'carrots', 6, 7), ('14 August 2020', 'Joe', 'cucumbers', 12, 8), ('18 August 2020','Stubs', 'pumkins', 11, 9), ('18 August 2020', 'Praise', 'tomatoes', 2, 10); SELECT SUM(price) from StoreCustomers where date = '12 August 2020'; SELECT * FROM StoreCustomers ORDER BY date Desc; SELECT * FROM StoreCustomers WHERE name like 'B%'; SELECT * FROM StoreCustomers WHERE name like '%b%';
run
|
edit
|
history
|
help
0
How i can get the difference of closest two date in two table join in postgresql
Islands demonstration
PostreSQL: Today's Date/Time
IF IN POSTGRESQL
generate-data-combinations-for-a-column-dynamically-based-on-another-column-sql-postgresql
Dashes in numbers
PostgreSQL: CASE
sample
Replace key of json
test