How many years had Nader Shah waged war against the Ottomans for until it ended with a stalemate?
return Nader Shah waged war against the  Ottomans ;return the  war ended with a stalemate ;return years of #1 ;return year of #2 ;return the  lowest of #3 ;return the  difference of #4 and  #5
['select', 'select', 'project', 'project', 'aggregate', 'arithmetic']