CREATE TABLE business (bid NUMBER, business_id VARCHAR2, name VARCHAR2, full_address VARCHAR2, city VARCHAR2, latitude VARCHAR2, longitude VARCHAR2, review_count NUMBER, is_open NUMBER, rating FLOAT, state VARCHAR2)
CREATE TABLE neighborhood (id NUMBER, business_id VARCHAR2, neighborhood_name VARCHAR2)
CREATE TABLE category (id NUMBER, business_id VARCHAR2, category_name VARCHAR2)
CREATE TABLE user (uid NUMBER, user_id VARCHAR2, name VARCHAR2)
CREATE TABLE checkin (cid NUMBER, business_id VARCHAR2, count NUMBER, day VARCHAR2)
CREATE TABLE tip (tip_id NUMBER, business_id VARCHAR2, text TEXT, user_id VARCHAR2, likes NUMBER, year NUMBER, month VARCHAR2)
CREATE TABLE review (rid NUMBER, business_id VARCHAR2, user_id VARCHAR2, rating FLOAT, text TEXT, year NUMBER, month VARCHAR2)

find the total checkins in Moroccan restaurant in ' Los Angeles ' on Friday
SELECT SUM(checkin.count) FROM business, category AS CATEGORY_0, category AS CATEGORY_1, checkin WHERE business.city = 'Los Angeles' AND CATEGORY_0.business_id = business.business_id AND CATEGORY_0.category_name = 'Moroccan' AND CATEGORY_1.business_id = business.business_id AND CATEGORY_1.category_name = 'restaurant' AND checkin.business_id = business.business_id AND checkin.day = 'Friday'
SELECT SUM("checkin"."count") FROM "business" JOIN "category" "CATEGORY_0" ON "CATEGORY_0"."business_id" = "business"."business_id" AND "CATEGORY_0"."category_name" = 'Moroccan' JOIN "category" "CATEGORY_1" ON "CATEGORY_1"."business_id" = "business"."business_id" AND "CATEGORY_1"."category_name" = 'restaurant' JOIN "checkin" ON "business"."business_id" = "checkin"."business_id" AND "checkin"."day" = 'Friday' WHERE "business"."city" = 'Los Angeles'