An html version of UnguardedGuard.cql; This file in not in the download cql.zip. Created by Tim Krabbé.

;;Find positions with white to move such that white 
;;is in check from a sliding piece and
;;on white's next move interposes a piece that is unguarded

(match
 :pgn heijden.pgn
 :output UnguardedGuard.pgn

 (position
  :wtm
  :moveto .d4
  :check
  :or
  ((position   :rayorthogonal ([qr] .d4 K))
   (position   :raydiagonal ([qb] .d4 K))
   )
	       
  :sequence
  ((position)
   (position :attackcount A Ad4 0)
   )
  :shift :markall)
 )
After executing this with "> cql UnguardedGuard.cql" there are 1545 studies found in the Harold van der Heijden Database 2015.
NB. When you see {MATCH} in the text, it means that cql has found the position asked for.

Below only 10 studies are presented: