Export all queries (and all blocked or allowed queries)from one specific devices

I would like to see a feature which allows to export all queries, all blocked queries and all allowed queries from one specific device. This can be very helpful for creating new blocklists.

If you have a device which calls VERY often to various domains it is not ideal to get everything through the web front end.

Is this a request for availability of this option from the web interface?
Note that this functionality is always available using a simple SQL statement.

Example:

sqlite3 /etc/pihole/pihole-FTL.db "SELECT DISTINCT domain FROM queries WHERE client IS \"192.168.2.1\";"

This command will list all domains requested by the client with IP 192.168.2.1. Note that the command might take a while whilst all available history data is being processed.

Yes, webinterface or cli option. I tried this sql command but there is no table called "queries" in the pihole-FTL.db database

How large is the database file? How does your /etc/pihole/pihole-FTL.conf look like?

Well this explains it. It is empty and du -sh shows 0

I see queries in /var/log/pihole.log but only from today

As the feature request is to export by cli or web interface and the former is possible I'm going to close the request.