def get_count_current_genre(id_genre) -> dict: """ Getting count of songs and artist with this genre :param id_genre: current genre :return: dictionary with the song and artist items that contain count """ song_count = get_count(sql_request_count_songs_genre(id_genre)) artist_count = get_count(sql_request_count_artists_genre(id_genre)) genres_count = create_genres_count(song_count, artist_count) return genres_count
def __get_count_all_genre() -> int: """ get count of all genre :return: count of genres """ count = get_count(get_count_table('genre')) return count
def __get_count_year_all() -> int: """ get count billboard years :return: count """ sql_request = _sql_request_years_all() count = get_count(sql_request) return count
def __get_count_song_billboard_more_once() -> int: """ Getting count of songs that hits billboard several times :return: count """ sql_request = sql_request_songs_hit_several_times(True) count = get_count(sql_request) return count
def __get_count_all_song() -> int: """ get count of all song :return: count of songs """ sql_request = get_count_table('song') count = get_count(sql_request) return count
def __get_count_genre_search(search) -> int: """ get count of genres by search data :param search: search year data :return: count """ sql_request = sql_request_genres('by_song', search, True) count = get_count(sql_request) return count
def __get_count_artists_group() -> int: """ Get count of the dead artists :return: count """ sql_request = sql_request_artists.sql_request_artists_group(True) count = get_count(sql_request) return count
def __get_count_all_artist() -> int: """ get count of all artist :return: count """ sql_request = get_count_table('artist') count = get_count(sql_request) return count
def __get_count_year_search(search) -> int: """ get count billboard years by search year data :param search: search year data :return: count """ sql_request = _sql_request_years_search(search) count = get_count(sql_request) return count
def __get_count_song_by_genre(genre) -> int: """ Getting count of songs with this genre :param genre: name genre :return: count """ sql_request = sql_request_songs_by_genre(genre, True) count = get_count(sql_request) return count
def __get_count_song_by_year(year) -> int: """ Getting count of songs with this year :param year: year's of getting at billboard :return: count """ sql_request = sql_request_songs_by_year(year, True) count = get_count(sql_request) return count
def __get_count_song_by_artist(artist) -> int: """ Getting count of songs with this artist :param artist: name of artist :return: count """ sql_request = sql_request_songs_by_artist(artist, True) count = get_count(sql_request) return count
def __get_count_song_by_title(title) -> int: """ Getting count of songs with this title :param title: title of song :return: count """ sql_request = sql_request_songs_by_title(title, True) count = get_count(sql_request) return count
def __get_count_artists_by_genre(genre: str) -> int: """ Get count of the artists with this genre :param genre: name of genre :return: count """ sql_request = sql_request_artists.sql_request_artists_by_genre(genre, True) count = get_count(sql_request) return count
def __get_count_artists_by_song(song: str) -> int: """ Get count of the artists who performed this song :param song: title of song :return: count """ sql_request = sql_request_artists.sql_request_artists_by_song(song, True) count = get_count(sql_request) return count
def __get_count_artists_by_name(name: str) -> int: """ Get count of the artists with this name :param name: artist name :return: count """ sql_request = sql_request_artists.sql_request_artists_by_name(name, True) count = get_count(sql_request) return count