0
2
llucycodes42
The SELECT COUNT function returns the number of occurrences of a particular column in a table. The expression in the code uses the AS keyword to create a temporary view of the table. The name of the view is then passed as an input to the SELECT COUNT function. The result of the function is then assigned to the variable ${&[USER_INPUT:2]/(.).*/$&[USER_INPUT:1]/}. This expression calculates the total number of records in the table that have the user_input column value 1.
Shortcut: s_scount
SELECT COUNT(*) FROM `$table`;