in reply to Explain SQL statement

Let's reformat it:
$sql = "SELECT * FROM tbl_admin WHERE day = '$d' AND month = '$m_num' +and year = '$y' AND expal IN (" . join (',', keys %expal) . ") AND status= '2'";
The code is an assignment. A variable, $sql, on the left of the assignment, a string on the right hand side. The string is created by concatenating three parts together. The last part is a simple string, the first part is a string with interpolation ($y), and the middle part is a join. Join takes a list as argument - the first element being a separator. join takes the rest of the arguments, and creates a single string out of them by separating said arguments with the separator. The list of things to be joined are the keys from the hash %expal.

Abigail