Since you are grouping by Fltno and Flt Dt, the distinct counts will always be 1, so the count distinct is working correctly. What are you trying to do? Perhaps you should explain how you would like to determine FlightNumber.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein