Export and Import of blacklist, blacklist wildcard, whitelist and whitelist wildcard as 4 txt files

ok I tried it but this is what I got.
2 are fresh Raspbian installs a few months ago.
It works on one an older pihole install.

From passwd -S
Install date Raspberry pi 02/14/2021 Works
Install date 08/08/2022 not working. 2022-04-04-raspios-buster-armhf.img
Install date 05/25/2022 not working 2022-04-04-raspios-buster-armhf.img

root@pihole7:~# sudo sqlite3 /etc/pihole/gravity.db "SELECT domain FROM domainlist WHERE enabled = 1 AND type = 1;"
sudo: sqlite3: command not found
root@pihole7:~#