SELECT T1.Customer_Event_ID  ,  T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID  =  T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING count(*) BETWEEN 1 AND 3
Which events have the number of notes between one and three? List the event id and the property id.
CREATE TABLE Customers (
customer_id INTEGER NOT NULL,
customer_details VARCHAR(255),
PRIMARY KEY (customer_id)
);
CREATE TABLE Properties (
property_id INTEGER NOT NULL,
property_type_code CHAR(15) NOT NULL,
property_address VARCHAR(255),
other_details VARCHAR(255),
PRIMARY KEY (property_id)
);
CREATE TABLE Residents (
resident_id INTEGER NOT NULL,
property_id INTEGER NOT NULL,
date_moved_in DATETIME NOT NULL,
date_moved_out DATETIME NOT NULL,
other_details VARCHAR(255),
PRIMARY KEY (resident_id, property_id, date_moved_in),
FOREIGN KEY (property_id) REFERENCES Properties (property_id)
);
CREATE TABLE Organizations (
organization_id INTEGER NOT NULL,
parent_organization_id INTEGER,
organization_details VARCHAR(255),
PRIMARY KEY (organization_id)
);
CREATE TABLE Services (
service_id INTEGER NOT NULL,
organization_id INTEGER NOT NULL,
service_type_code CHAR(15) NOT NULL,
service_details VARCHAR(255),
PRIMARY KEY (service_id),
FOREIGN KEY (organization_id) REFERENCES Organizations (organization_id)
);
CREATE TABLE Residents_Services (
resident_id INTEGER NOT NULL,
service_id INTEGER NOT NULL,
date_moved_in DATETIME,
property_id INTEGER,
date_requested DATETIME,
date_provided DATETIME,
other_details VARCHAR(255),
PRIMARY KEY (resident_id, service_id),
FOREIGN KEY (service_id) REFERENCES Services (service_id),
FOREIGN KEY (resident_id, property_id, date_moved_in) REFERENCES Residents (resident_id,property_id,date_moved_in)
);
CREATE TABLE Things (
thing_id INTEGER NOT NULL,
organization_id INTEGER NOT NULL,
Type_of_Thing_Code CHAR(15) NOT NULL,
service_type_code CHAR(10) NOT NULL,
service_details VARCHAR(255),
PRIMARY KEY (thing_id),
FOREIGN KEY (organization_id) REFERENCES Organizations (organization_id)
);
CREATE TABLE Customer_Events (
Customer_Event_ID INTEGER NOT NULL,
customer_id INTEGER,
date_moved_in DATETIME,
property_id INTEGER,
resident_id INTEGER,
thing_id INTEGER NOT NULL,
PRIMARY KEY (Customer_Event_ID),
FOREIGN KEY (thing_id) REFERENCES Things (thing_id),
FOREIGN KEY (customer_id) REFERENCES Customers (customer_id),
FOREIGN KEY (resident_id, property_id, date_moved_in) REFERENCES Residents (resident_id,property_id,date_moved_in)
);
CREATE TABLE Customer_Event_Notes (
Customer_Event_Note_ID INTEGER NOT NULL,
Customer_Event_ID INTEGER NOT NULL,
service_type_code CHAR(15) NOT NULL,
resident_id INTEGER NOT NULL,
property_id INTEGER NOT NULL,
date_moved_in DATETIME NOT NULL,
PRIMARY KEY (Customer_Event_Note_ID),
FOREIGN KEY (Customer_Event_ID) REFERENCES Customer_Events (Customer_Event_ID)
);
CREATE TABLE Timed_Status_of_Things (
thing_id INTEGER NOT NULL,
Date_and_Date DATETIME NOT NULL,
Status_of_Thing_Code CHAR(15) NOT NULL,
PRIMARY KEY (thing_id, Date_and_Date, Status_of_Thing_Code),
FOREIGN KEY (thing_id) REFERENCES Things (thing_id)
);
CREATE TABLE Timed_Locations_of_Things (
thing_id INTEGER NOT NULL,
Date_and_Time DATETIME NOT NULL,
Location_Code CHAR(15) NOT NULL,
PRIMARY KEY (thing_id, Date_and_Time, Location_Code),
FOREIGN KEY (thing_id) REFERENCES Things (thing_id));
INSERT INTO `Customers` (`customer_id`, `customer_details`) VALUES (4, 'Mr. Raul Prosacco');
INSERT INTO `Properties` (`property_id`, `property_type_code`, `property_address`, `other_details`) VALUES (24, 'apartment', '85456 Annie Lodge Suite 449', 'USA');
INSERT INTO `Residents` (`resident_id`, `property_id`, `date_moved_in`, `date_moved_out`, `other_details`) VALUES (6, 954, '2017-06-17 15:43:33', '2017-12-18 03:46:04', 'Anderson Batz');
INSERT INTO `Organizations` (`organization_id`, `parent_organization_id`, `organization_details`) VALUES (7, 7, 'Reinger, Hudson and Nolan Group');
INSERT INTO `Services` (`service_id`, `organization_id`, `service_type_code`, `service_details`) VALUES (10, 10, 'Cleanning', 'Satisfied');
INSERT INTO `Residents_Services` (`resident_id`, `service_id`, `date_moved_in`, `property_id`, `date_requested`, `date_provided`, `other_details`) VALUES (6, 49, '2017-06-17 15:43:33', 954, '2016-07-25 01:32:23', '2018-02-26 00:27:11', 'Satisfied');
INSERT INTO `Things` (`thing_id`, `organization_id`, `Type_of_Thing_Code`, `service_type_code`, `service_details`) VALUES (1, 8, 'Electronics', 'Check', 'Unsatisfied');
INSERT INTO `Customer_Events` (`Customer_Event_ID`, `customer_id`, `date_moved_in`, `property_id`, `resident_id`, `thing_id`) VALUES (70, 19, '2015-03-27 12:00:00', 605, 10, 1);
INSERT INTO `Customer_Event_Notes` (`Customer_Event_Note_ID`, `Customer_Event_ID`, `service_type_code`, `resident_id`, `property_id`, `date_moved_in`) VALUES (18, 70, 'Cleanning', 58, 107, '2016-08-04 01:06:05');
INSERT INTO `Timed_Locations_of_Things` (`thing_id`, `Date_and_Time`, `Location_Code`) VALUES (2, '2016-10-12 12:03:07', '064 Charles Mou');
INSERT INTO `Timed_Status_of_Things` (`thing_id`, `Date_and_Date`, `Status_of_Thing_Code`) VALUES (2, '2016-05-27 23:33:34', 'Open');