Free LPI 102-500 Actual Exam Questions - Question 7 Discussion
__________ count(*) from tablename;
(Please specify the missing word using lower-case letters only.)
I’d also say "select" fits best because count(*) is used within a select statement to get the total rows. No other SQL keyword would make sense before count(*).
"select" makes the most sense here, since count(*) is always used with select to fetch the result. No other keyword logically fits before count(*).
It has to be "select" since SQL commands for retrieving data always start with that, and count(*) is a function needing a select statement. No other keyword fits there.
I agree it’s probably just "select" since that’s the SQL command to retrieve data, and count(*) is an aggregate function needing a select statement to work. Other words don’t fit here.
It has to be "select" because SQL queries start with that keyword when retrieving data. No other single word fits grammatically before count(*).
It’s got to be select, right? Without that, the query won’t run, so no other word fits before count(*).
I’d rule out anything but “select” since count(*) can’t stand alone. It’s the only keyword that makes the statement a valid query. Nothing else fits before count(*) in standard SQL syntax.
select makes the query valid and returns the count.
I’d go with “select” as well. Without it, the statement isn’t a proper SQL query. The function count(*) needs to be part of a select clause to return results, so nothing else fits there logically. Plus, it’s standard SQL syntax to start queries like this with “select.”
I agree with the consensus on "select." Another way to see it is that without "select," the statement doesn't form a valid SQL query at all. "count(*)" is a function used in the SELECT clause to return the number of rows, so nothing else fits in that blank logically. No other SQL keyword would work there since "from" follows right after and "count(*)" needs to be selected. So definitely "select."
select is definitely the keyword that starts any query with aggregate functions.
Because count(*) is an aggregate, it has to be preceded by select to work.
I agree with the others that "select" is the missing word here. Without it, count(*) just sits there and won’t run as a valid query. The rest of the statement, "count(*) from tablename," looks like a standard way to count rows, so it makes the most sense that the question wants "select" before it. No need to overthink with other clauses or keywords for this basic example.
I thought about other keywords like from or where, but since count(*) is a function, it really has to be preceded by select to form a valid query. So select fits best here.
The missing word has to be select. count(*) by itself isn’t a command; it’s a function that needs to be part of a select statement to pull data from the table. It makes no sense without select at the start, since you’re basically telling SQL to return the count result as a query output. Other keywords like from or where wouldn’t fit there because they come after the count(*).
select, because count(*) needs to be part of a query fetching data.
I agree with select being the missing word. count(*) is an aggregate function that summarizes data, and it only makes sense within a query that retrieves data, which is what select does. Other keywords like insert or delete wouldn’t fit because they’re about modifying data, not retrieving it. Plus, the syntax just wouldn’t parse correctly without select upfront.
I'd say select is definitely the word here. You can't just have count(*) on its own; it requires select to form a proper SQL query. Other options like insert or update don't make sense in this context because they don't work with count(*) directly. The function count(*) is meant to be used inside a select statement to return the number of rows. So, select is the only word that makes this a valid and standard SQL command.
It has to be select since in SQL, any function like count(*) needs to be part of a select statement to actually run the query and return results. Without select, the syntax just doesn’t work. No other keywords can replace it here because count(*) itself isn’t a command, it’s part of the data retrieval process inside select.
The missing word has to be select because count(*) is an aggregate function and needs a proper SQL clause before it. Nothing else fits there.