Query Contacts database from shell

How about

syncevolution --print-items backend=evolution-contacts | grep 'Fynnus'
?