Help with SQL Fiddle!
When did sqlfiddle.com take off?
I created it in January 2012. Most of the traffic that I get comes from Stack Overflow, which is expected since that is basically why I created it and where I started using it. As for when did it "take off" - hard to say, usage has been growing steadily since I first released it. Now getting around 4k visitors each day.
More on reddit.comDB Fiddle - SQL Database Playground
Are there any simple offline SQL visualizers similar to sqlfiddle?
Videos
Hi, I'm struggling to find answers as to why my SQL is giving a syntax error in SQL Fiddle.Particularly, only after I added the last INSERT statement (last 4 lines) will I receive an error code.My class threw me in (I have understanding in Python and Cpp so this really shouldn't be stumping me) and I've no prior experience with SQL Fiddle.Feel like I'm going crazy trying to scour the internet for the right answer, all help appreciated!!
CODE:
CREATE TABLE coffee_shop (
shop_id INTEGER PRIMARY KEY,
shop_name VARCHAR(50),
city VARCHAR(50),
state CHAR(2)
);
CREATE TABLE employee (
employee_id INTEGER PRIMARY KEY,
first_name VARCHAR(30),
last_name VARCHAR(30),
hire_date DATE,
job_title VARCHAR(30),
shop_id INTEGER,
FOREIGN KEY (shop_id) REFERENCES coffee_shop(shop_id)
);
CREATE TABLE supplier (
supplier_id INTEGER PRIMARY KEY,
company_name VARCHAR(50),
country VARCHAR(30),
sales_contact_name VARCHAR(60),
email VARCHAR(50)
);
CREATE TABLE coffee (
coffee_id INTEGER PRIMARY KEY,
shop_id INTEGER,
supplier_id INTEGER,
coffee_name VARCHAR(30),
price_per_pound NUMERIC(5,2),
FOREIGN KEY (shop_id) REFERENCES coffee_shop(shop_id),
FOREIGN KEY (supplier_id) REFERENCES supplier(supplier_id)
);
INSERT INTO coffee_shop VALUES
(10, 'Good Mornings', 'Asheville', 'TN'),
(11, 'Juggheads', 'Boone', 'NC'),
(12, 'Pepper Oak Brews', 'Turnersville', 'NJ')
INSERT INTO employee VALUES
(100, 'First', 'Last', 2022-01-01, 'Barista', 10),
(101, 'First1', 'Last1', 2021-09-27, 'Bartender', 11),
(102, 'First2', 'Last2', 2023-12-21, 'Hostess', 12)
TYIA!