Skip to content

Instantly share code, notes, and snippets.

View aveek22's full-sized avatar
🏠
Working from home

Aveek aveek22

🏠
Working from home
View GitHub Profile
CREATE OR REPLACE VIEW vw_mumbai_houses_airport_5km_west_facing
AS
SELECT * FROM vw_mumbai_houses_airport_5km
WHERE 1=1
AND "desc" ~ '^.(W|w)est (F|f)acing.$'
This file has been truncated, but you can view the full file.
CREATE TABLE public.sqlshack_regex (
id integer NOT NULL,
stockindustry text NOT NULL,
stockmarket text NOT NULL,
stocksector text NOT NULL,
stockname text NOT NULL,
stockvalue numeric(5,2) NOT NULL,
stockholder text NOT NULL,
This file has been truncated, but you can view the full file.
DROP TABLE IF EXISTS GreaterManchesterCrime;
CREATE TABLE IF NOT EXISTS GreaterManchesterCrime (
CrimeID TEXT PRIMARY KEY ,
CrimeTS TIMESTAMP,
Location TEXT,
LSOA TEXT,
Type TEXT,
Outcome TEXT,
theGeom GEOMETRY
SELECT * FROM GreaterManchesterCrime
WHERE CrimeID ~ '^[A-Z].*$'
SELECT * FROM GreaterManchesterCrime
WHERE CrimeID ~ '^[0-9].*$'
SELECT * FROM GreaterManchesterCrime
WHERE CrimeID ~ '^\d.*$'
SELECT * FROM GreaterManchesterCrime
WHERE CrimeID ~ '^[A-Z]{2}.*$'
SELECT * FROM GreaterManchesterCrime
WHERE CrimeID ~ '^[A-Z][0-9].*$'
{
"id": "1",
"productName" : "Samsung Galaxy Mobile",
"productCategory" : "Electronics",
"totalPrice" : 1000
},
{
"id": "2",
"productName" : "Mercedes Benz",
"productCategory" : "Automobile",
class Users(Resource):
# Write method to fetch data from the CSV file
def get(self):
pass
def post(self):
# Write method to write data to the CSV file
pass
def delete(self):