Make a database query using WordPress

if I understand you correctly, you might want something like this:

global $wpdb;

$number=30; // EDIT this to your needs

$sql="SELECT post_id
FROM `wp_ak_popularity`
ORDER BY `single_views`
DESC LIMIT %d";

$my_top_posts = $wpdb->get_results($wpdb->prepare($sql,$number),ARRAY_N);

to get an array of the top posts id’s.

You could then use this in your WP_Query:

'post__in' => $my_top_posts