I have two tables:
SELECT count(m.member_id) AS Amount_of_members ,count(o.order_id) ,sum(o.order_amount) FROM tbl_member m LEFT JOIN tbl_order o ON m.member_id = o.member_id
You can ask the db to count only unique occurrences of the member id
SELECT count(DISTINCT m.member_id) AS Amount_of_members
You can also run a subquery to group the orders up so there is only one row per member before you join to the members table, which means the members data won't be doubled up if a member has 2 orders, tripled up if they have 3 etc
SELECT
count(m.member_id) AS Amount_of_members ,
sum(x.count_orders) as total_count_of_orders,
sum(x.sum_orders) as total_sum_of_orders
FROM
tbl_member m
LEFT JOIN (
SELECT
o.member_id,
count(o.order_id) as count_orders ,
sum(o.order_amount) as sum_orders
FROM
tbl_order o
GROUP BY o.member_id
)x ON m.member_id = x.member_id
Generally the "squash the many side of a 1:M relationship down to one row before the join is done" is a helpful way to manage the data, especially if there are multiple joins that need to be made. Getting everything 1:1 means no duplicates pop up