def tag_fields_to_sql(fields):
    """Converts a list of fields stored in the tags hstore into a list of SQL fields:
        name:en   =>   NULLIF(tags->'name:en', '') AS name:en
    """
    return [f"NULLIF(tags->'{fld}', '') AS \"{fld}\"" for fld in fields]