The present invention provides aza-heteroaryl derivatives of Formula I:and pharmaceutically acceptable salts thereof, wherein X, Y, Z, A, W, R4, R5, and R6 are defined herein, that inhibit the activity of phosphoinositide 3-kinases-gamma (PI3Kγ) and are useful in the treatment of diseases related to the activity of PI3Kγ including, for example, autoimmune diseases, cancer, cardiovascular diseases, and neurodegenerative diseases.