study abstract class Query and all subclass