Question: Find all the crimes that took place at the address '123 Main Street'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Crime)-[r:OCCURRED_AT]->(m:Location) WHERE toLower(m.address) CONTAINS toLower('123 Main Street') RETURN n, r, m


Question: Finds all crimes that took place at the address '%address%'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Crime)-[r:OCCURRED_AT]->(m:Location) WHERE toLower(m.address) CONTAINS toLower('%address%') RETURN n, r, m


Question: Find all the people who have committed a crime

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Person)-[r:PARTY_TO]->(m:Crime) RETURN n, r, m


Question: Find a person with the name 'John Doe'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Person) WHERE toLower(n.name) = toLower('John Doe') RETURN n


Question: Find all the crimes committed by a person whose name is 'John Doe'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Person)-[r:PARTY_TO]->(m:Crime) WHERE toLower(n.name) = toLower('John Doe') RETURN n, r, m


Question: Finds all phone calls lasting more than 10 minutes

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:PhoneCall) WHERE toInteger(n.call_duration) > 10 RETURN n


Question: Finds all telephone calls lasting more than 10 minutes made on January 1, 2020.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:PhoneCall) WHERE toInteger(n.call_duration) > 10 AND toLower(n.call_date) = '2020-01-01' RETURN n


Question: Finds crime with ID 'CR123456'

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Crime) WHERE toLower(n.id) = toLower('CR123456') RETURN n


Question: Finds the crime with ID '%crime_id%'

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Crime) WHERE toLower(n.id) = toLower('%crime_id%') RETURN n


Question: Find the cars involved in the crime with ID 'CR123456'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Crime)-[r:INVOLVED_IN]->(m:Vehicle) WHERE toLower(n.id) = toLower('CR123456') RETURN n, r, m


Question: Finds cars involved in crime with ID '%crime_id%'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Crime)-[r:INVOLVED_IN]->(m:Vehicle) WHERE toLower(n.id) = toLower('%crime_id%') RETURN n, r, m


Question: Find crimes involving a 'Toyota' car

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Vehicle) WHERE toLower(n.make) = toLower('Toyota') RETURN n


Question: Find crimes involving a car of the make 'Toyota' and model 'Corolla'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Vehicle) WHERE toLower(n.make) = toLower('Toyota') AND toLower(n.model) = toLower('Corolla') RETURN n


Question: Find crimes involving a car of make 'Toyota' and model 'Corolla' and registration '123ABC'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Vehicle) WHERE toLower(n.make) = toLower('Toyota') AND toLower(n.model) = toLower('Corolla') AND toLower(n.reg) = toLower('123ABC') RETURN n


Question: Find crimes involving a car of the make '%make%'

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Vehicle) WHERE toLower(n.make) = toLower('%make%') RETURN n


Question: Find the police officers who investigated a crime

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Officer)<-[r:INVESTIGATED_BY]-(m:Crime) RETURN n, r, m


Question: Find the police officers who investigated a crime with the ID 'CR123456'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Officer)<-[r:INVESTIGATED_BY]-(m:Crime) WHERE toLower(m.id) = toLower('CR123456') RETURN n, r, m


Question: Find police officers who have investigated a crime with the ID '%crime_id%'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Officer)<-[r:INVESTIGATED_BY]-(m:Crime) WHERE toLower(m.id) = toLower('%crime_id%') RETURN n, r, m


Question: Find the officer with the badge '123456'

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Officer) WHERE toLower(n.badge_no) = toLower('123456') RETURN n


Question: Find the officer with the badge '%badge_no%'

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Officer) WHERE toLower(n.badge_no) = toLower('%badge_no%') RETURN n


Question: Find objects of type 'Evidence'

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Object) WHERE toLower(n.type) = toLower('Evidence') RETURN n


Question: Finds objects of type 'Evidence' with ID 'OB123456'

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Object) WHERE toLower(n.type) = toLower('Evidence') AND toLower(n.id) = toLower('OB123456') RETURN n


Question: Finds objects of type 'Evidence' with ID '%object_id%'

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Object) WHERE toLower(n.type) = toLower('Evidence') AND toLower(n.id) = toLower('%object_id%') RETURN n


Question: Find the objects involved in a crime

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Object)-[r:INVOLVED_IN]->(m:Crime) RETURN n,r,m


Question: Finds objects involved in a crime with ID 'CR123456'

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Object)-[r:INVOLVED_IN]->(m:Crime) WHERE toLower(m.id) = toLower('CR123456') RETURN n, r, m


Question: Finds objects involved in a crime with ID '%crime_id%'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Object)-[r:INVOLVED_IN]->(m:Crime) WHERE toLower(m.id) = toLower('%crime_id%') RETURN n, r, m


Question: Find the cars involved in a crime

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Vehicle)-[r:INVOLVED_IN]->(m:Crime) RETURN n,r,m


Question: Finds cars involved in a crime with the ID 'CR123456'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Vehicle)-[r:INVOLVED_IN]->(m:Crime) WHERE toLower(m.id) = toLower('CR123456') RETURN n, r, m


Question: Finds cars involved in a crime with ID '%crime_id%'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Vehicle)-[r:INVOLVED_IN]->(m:Crime) WHERE toLower(m.id) = toLower('%crime_id%') RETURN n, r, m


Question: Find all phone calls that took place after 6 p.m.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:PhoneCall) WHERE toInteger(split(n.call_time, ':')[0]) > 18 RETURN n


Question: Find all telephone calls that took place after 6 p.m. and lasted more than 10 minutes.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:PhoneCall) WHERE toInteger(split(n.call_time, ':')[0]) > 18 AND toInteger(n.call_duration)) > 10 RETURN n


Question: Find all telephone calls that took place after 6 p.m. and lasted more than 10 minutes and were placed through the number '1234567890'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:PhoneCall) WHERE toInteger(split(n.call_time, ':')[0]) > 18 AND toInteger(n.call_duration) > 10 AND toLower(n.phoneNo) = toLower('1234567890') RETURN n


Question: Find all phone calls that took place after 6pm and lasted more than 10 minutes and that were placed through the number '%phone_no%'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:PhoneCall) WHERE toInteger(split(n.call_time, ':')[0]) > 18 AND toInteger(n.call_duration) > 10 AND toLower(n.phoneNo) = toLower('%phone_no%') RETURN n


Question: Find all telephone calls made after January 1, 2020

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:PhoneCall) WITH n, [item in split(n.call_date, '/') | toInteger(item)] as date WHERE date[2] > 2020 OR (date[2] = 2020 AND (date[1] > 1 OR (date[1] = 1 AND date[0] > 1))) RETURN n


Question: Find all telephone calls that took place after January 1, 2020 and lasted more than 10 minutes.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:PhoneCall) WITH n, [item in split(n.call_date, '/') | toInteger(item)] as date WHERE date[2] > 2020 OR (date[2] = 2020 AND (date[1] > 1 OR (date[1] = 1 AND date[0] > 1))) AND toInteger(n.call_duration) > 10 RETURN n


Question: Find all telephone calls that took place after January 1, 2020 and lasted more than 10 minutes and were placed through the number '1234567890'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:PhoneCall) WITH n, [item in split(n.call_date, '/') | toInteger(item)] as date WHERE date[2] > 2020 OR (date[2] = 2020 AND (date[1] > 1 OR (date[1] = 1 AND date[0] > 1))) AND toInteger(n.call_duration) > 10 AND toLower(n.phoneNo) = toLower('1234567890') RETURN n


Question: Find all crimes that took place after January 1, 2020

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Crime) WITH n, [item in split(n.date, '/') | toInteger(item)] as date WHERE date[2] > 2020 OR (date[2] = 2020 AND (date[1] > 1 OR (date[1] = 1 AND date[0] > 1))) RETURN n


Question: Find all 'Vehicle Crime' crimes

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Crime) WHERE toLower(n.type) = toLower('Vehicle Crime') RETURN n


Question: Finds all crimes of type '%crime_type%'

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Crime) WHERE toLower(n.type) = toLower('%crime_type%') RETURN n


Question: Find all crimes that took place after January 1, 2020 and are currently under investigation.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Crime) WHERE toLower(n.last_outcome) CONTAINS toLower('Under investigation') AND (toInteger(split(n.date, '/')[2]) > 2020 OR (toInteger(split(n.date, '/')[2]) = 2020 AND (toInteger(split(n.date, '/')[1]) > 1 OR (toInteger(split(n.date, '/')[1]) = 1 AND toInteger(split(n.date, '/')[0]) > 1))) RETURN n


Question: Find all the people who have suffered a crime involving a car

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Person)-[r:PARTY_TO]->(m:Crime)<-[r2:INVOLVED_IN]-(o:Vehicle) RETURN n, r, m, r2, o


Question: Finds all persons who are related to a person

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Person)-[r:FAMILY_REL]->(m:Person) RETURN n, r, m


Question: Find all related persons involved in the same crime

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Person)-[r:FAMILY_REL]->(m:Person)-[r2:PARTY_TO]->(o:Crime) RETURN n, r, m, r2, o


Question: Find all the nodes

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"


Question: Find 25 postcodes

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"


Question: Finds 25 phone calls

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"


Question: Find 25 crimes

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"


Question: Find all Gmail emails

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Email) WHERE toLower(n.email_address) CONTAINS toLower('@gmail.com') RETURN n


Question: Finds all people living in the area with the zip code 'AB10'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Person)-[:CURRENT_ADDRESS]->(:Location)-[:HAS_POSTCODE]->(m:PostCode) WHERE toLower(m.code) = toLower('AB10') RETURN n


Question: Returns all emails from the person with the phone number '1234567890'.

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Email)<-[r1:HAS_EMAIL]-(o:Person)-[r2:HAS_PHONE]->(p:Phone) WHERE toLower(p.phoneNo) = toLower('1234567890') RETURN n, r1, o, r2, p


Question: Find all people with multiple phone numbers

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Person)-[r:HAS_PHONE]->(m:Phone) WITH n, count(m) as phone_count WHERE phone_count > 1 RETURN n


Question: Find all the people who have multiple emails

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Person)-[r:HAS_EMAIL]->(m:Email) WITH n, count(m) as email_count WHERE email_count > 1 RETURN n


Question: Find all the people who have suffered more than one crime

Node properties are the following: ":Person {surname: STRING, nhs_no: STRING, name: STRING, age: STRING},:Location {latitude: FLOAT, postcode: STRING, longitude: FLOAT, address: STRING},:Phone {phoneNo: STRING},:Email {email_address: STRING},:Officer {badge_no: STRING, rank: STRING, name: STRING, surname: STRING},:PostCode {code: STRING},:Area {areaCode: STRING},:PhoneCall {call_duration: STRING, call_time: STRING, call_date: STRING, call_type: STRING},:Crime {date: STRING, id: STRING, type: STRING, last_outcome: STRING, note: STRING, charge: STRING},:Object {description: STRING, id: STRING, type: STRING},:Vehicle {model: STRING, reg: STRING, make: STRING, year: STRING}" Relationship properties are the following: ":CURRENT_ADDRESS {},:HAS_PHONE {},:HAS_EMAIL {},:HAS_POSTCODE {},:POSTCODE_IN_AREA {},:LOCATION_IN_AREA {},:KNOWS_SN {},:KNOWS {},:CALLER {},:CALLED {},:KNOWS_PHONE {},:OCCURRED_AT {},:INVESTIGATED_BY {},:INVOLVED_IN {},:PARTY_TO {},:FAMILY_REL {rel_type: STRING},:KNOWS_LW {}" Relationship point from source to target nodes "(:Person)-[:FAMILY_REL]->(:Person),(:Person)-[:CURRENT_ADDRESS]->(:Location),(:Person)-[:KNOWS]->(:Person),(:Person)-[:HAS_PHONE]->(:Phone),(:Person)-[:KNOWS_PHONE]->(:Person),(:Person)-[:HAS_EMAIL]->(:Email),(:Person)-[:KNOWS_SN]->(:Person),(:Person)-[:KNOWS_LW]->(:Person),(:Person)-[:PARTY_TO]->(:Crime),(:Location)-[:LOCATION_IN_AREA]->(:Area),(:Location)-[:HAS_POSTCODE]->(:PostCode),(:PostCode)-[:POSTCODE_IN_AREA]->(:Area),(:PhoneCall)-[:CALLED]->(:Phone),(:PhoneCall)-[:CALLER]->(:Phone),(:Crime)-[:INVESTIGATED_BY]->(:Officer),(:Crime)-[:OCCURRED_AT]->(:Location),(:Object)-[:INVOLVED_IN]->(:Crime),(:Vehicle)-[:INVOLVED_IN]->(:Crime)"

MATCH (n:Person)-[r:PARTY_TO]->(m:Crime) WITH n, count(m) as crime_count WHERE crime_count > 1 RETURN n