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