Which grants are described as 'regular'?
select * from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id join document_types as t3 on t2.document_type_code = t3.document_type_code where t3.document_description = 'Regular'
Which grants are described both 'regular' and 'initial application'?
select * from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id join document_types as t3 on t2.document_type_code = t3.document_type_code where t3.document_description = 'Regular' intersect select * from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id join document_types as t3 on t2.document_type_code = t3.document_type_code where t3.document_description = 'Initial Application'
Can you show me the start date for all these grants?
select t1.grant_start_date from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id join document_types as t3 on t2.document_type_code = t3.document_type_code where t3.document_description = 'Regular' intersect select t1.grant_start_date from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id join document_types as t3 on t2.document_type_code = t3.document_type_code where t3.document_description = 'Initial Application'