Skip to content

Print SQL Query when user searches from admin product grid

I am using Magento 2.3.4

Can we print a SQL query when product search from admin product grid?

I can print sql queries in our custom or product collection in frontend using

$collection->getSelect()->__toString();

but I want to print the SQL query in the admin product grid.