What determines DNS will query IPV6 address?

When I do simple nslookup it does not generate any query for IPV6 (AAAA). But sometimes I see DNS query for both A and AAAA are generated. What decides this? The reason I do not want AAAA query is in most of the cases AAAA records are absent. Hence, if one DNS server fails, the clients keeps attempting to send AAAA query.

The second query is from clients where both IPv4 and IPv6 are enabled. If you do not want the second query on a client and you are only using IPv4, try disabling IPv6 on that particular client.