How can I get the first 50% of all posts (within a custom post type)?

If you want to split it into two lists, you could use wp_count_posts() to count the number of your published posts

$total_cpt = wp_count_posts('cpt')->publish;

divide it by 2:

$half_of_cpt = sprintf( '%d', $total_cpt / 2 );

and then you could use this number in the loop to split your list.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)