Family Historian comes with a large selection of standard Queries and there are a large number of user provided queries in the Download/Queries, but sooner or latter you will probably want to write your own.
A good place to start is the Creating a Married Women Query animated tutorial.
Section how_to