0
0
PostgreSQLquery~20 mins

What is PostgreSQL - Practice Questions & Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
PostgreSQL Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:00remaining
What is PostgreSQL primarily used for?
Choose the best description of PostgreSQL's main purpose.
AA relational database management system to store and manage data.
BA web server software to host websites.
CA programming language for building mobile apps.
DA tool for graphic design and image editing.
Attempts:
2 left
💡 Hint
Think about where data is stored and organized for applications.
🧠 Conceptual
intermediate
1:00remaining
Which feature is a key strength of PostgreSQL?
Select the feature that best describes PostgreSQL's capabilities.
AIs mainly used for video editing and rendering.
BOnly stores data in simple text files without structure.
CRuns only on Windows operating systems.
DSupports complex queries and transactions with data integrity.
Attempts:
2 left
💡 Hint
Think about how databases handle multiple operations safely.
query_result
advanced
1:30remaining
What is the output of this PostgreSQL query?
Given the table 'employees' with columns 'id' and 'name', what does this query return?
SELECT COUNT(*) FROM employees WHERE name LIKE 'A%';
PostgreSQL
SELECT COUNT(*) FROM employees WHERE name LIKE 'A%';
AThe total number of employees in the table.
BThe number of employees whose names start with 'A'.
CAn error because LIKE cannot be used with COUNT.
DA list of employee names starting with 'A'.
Attempts:
2 left
💡 Hint
COUNT(*) counts rows matching the condition.
📝 Syntax
advanced
1:30remaining
Which option is a valid PostgreSQL command to create a table?
Identify the correct SQL syntax to create a table named 'products' with columns 'id' (integer) and 'name' (text).
ACREATE products TABLE (id INTEGER, name TEXT);
BMAKE TABLE products {id INTEGER, name STRING};
CCREATE TABLE products (id INT, name TEXT);
DTABLE CREATE products (id INT, name TEXT);
Attempts:
2 left
💡 Hint
The command starts with CREATE TABLE followed by table name and columns.
optimization
expert
2:00remaining
Which index type is best for speeding up text search in PostgreSQL?
You want to optimize searches for words inside large text columns. Which index type should you use?
AGIN (Generalized Inverted Index)
BHash index
CB-tree index
DBitmap index
Attempts:
2 left
💡 Hint
Think about indexes designed for full-text search.