Spark SQL lets you query distributed data with standard SQL, alongside the DataFrame API. Both go through the same optimizer and produce the same plans: you choose based on readability. spark.sql() returns a DataFrame.
Example
spark.sql('SELECT pays, SUM(montant) FROM ventes GROUP BY pays')