Q: What is the DataFrame equivalent of the SQL statement
A:
SELECT count(*) AS total
A:
.agg(count("*").alias("total"))
Q: What is the DataFrame equivalent of the SQL statement
A:
SELECT firstName FROM PeopleDistinctNames INNER JOIN SSADistinctNames ON firstName = ssaFirstName
A:
peopleDistinctNamesDF.join(ssaDistinctNamesDF, peopleDistinctNamesDF(col("firstName")) == col("ssaFirstName"))
No comments:
Post a Comment