So what will be the count of rows in that?
💡 Model Answer
To determine the number of rows in a table or result set, you use the COUNT aggregate function. In SQL, you would write: SELECT COUNT(*) FROM table_name; This returns a single integer representing the total rows. If you need to count distinct values, use COUNT(DISTINCT column). In Spark, you can call df.count() on a DataFrame, which triggers an action that returns the row count. Both approaches are straightforward and are often used in exploratory data analysis or as a sanity check after a transformation.
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.
Get Assisting AI — Starts at ₹500