SQL Poor Performance on join query

Avoid using functions on table columns in where clause. Also, check whether "group by" is necessary as suggested by @jarlh

If d_ord is timestamp column, change where clause to

a.d_ord < timestamp( CURRENT_DATE + 1 days)
 AND a.d_ord >= timestamp( CURRENT_DATE - 30 DAYS )