async def METHOD_NAME(
    db: Database, user: Optional[str] = None, billing_project: Optional[str] = None
) -> List[Dict[str, Any]]:
    where_conditions = ["billing_projects.`status` != 'deleted'"]
    args = []
    if user:
        where_conditions.append("JSON_CONTAINS(users, JSON_QUOTE(%s))")
        args.append(user)
    if billing_project:
        where_conditions.append('billing_projects.name_cs = %s')
        args.append(billing_project)
    if where_conditions:
        where_condition = f'WHERE {" AND ".join(where_conditions)}'
    else:
        where_condition = ''
    sql = f'''