An html version of zwickmuhle.cql; Created by Gady Costeff and Lewis Stiller.

;This looks for Zwickmuhle's with bishop and knight. Specifically, we
;are looking for positions where a minor piece moves to a square,
;giving check, and then later moves from the square, giving orthogonal
;check from a rook or queen, and then again from the square giving
;check. This illustrates the use of multiple positions inside a match
;list to help increase efficiency. Games not matching the first
;position will not have to run through the much more complex second
;position.

(match
 :pgn mega.pgn
 :gamenumber 1 3000
 :output zwickmuhle.pgn


 (position      :matchcount 2 1000 
		:flipcolor
		:noannotate
		:sequence
		((position :movefrom [BN] )
		 (position :check :movefrom k)
		 ))


 (position  
  :flipcolor
  :shift
  :and (
	(position :sequence
		  (
		   (position :movefrom [BN] :moveto ?c6)
		   (position :check :movefrom k)))
	(position  :gappedsequence
		   (
		    (position      :sequence
				   ((position :movefrom [BN]c6)
				    (position :check :rayorthogonal ([RQ] . k)  :movefrom k)
				    )
				   )

		    (position      :sequence
				   ((position :movefrom [BN] :moveto ?c6)
				    (position :check :movefrom k)
				    )
				   )

		    )
		   )
	)
  )
 )

After executing this with "> cql ZwickMuhle.cql" there are 9 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 4 studies presented: