def get_query(node, dataType, MAC):
 if node and dataType:
    query = f"SELECT * FROM Measurement WHERE NodeID = {node} AND Type = '{dataType}'"
 elif node:
    query = f"SELECT * FROM Measurement WHERE NodeID = {node}"
 elif dataType:
    query = f"SELECT * FROM Measurement WHERE Type = '{dataType}'"
 elif MAC:
    query = f"SELECT * FROM Node WHERE MAC = '{MAC}'"
 else:
    query = "SELECT * FROM `Measurement`"
 return query



def update_query(node, name, location):
   if node and name and location:
      query = f"""
        UPDATE Node
        SET Name = '{name}', Location = '{location}'
        WHERE NodeID = {node};
        """
   return query