ComeçarComece de graça

Working with the correct data types

It’s now time to practice your understanding of various data types in SQL Server and how to convert them from one type to another. In this exercise, you will query the voters table. Remember that this table holds information about the people who provided ratings for the different chocolate flavors.

You are going to write a query that returns information (first name, last name, gender, country, number of times they voted) about the female voters from Belgium, who voted more than 20 times.

You will work with columns of different data types and perform both implicit and explicit conversions between different types of data (using CAST() and CONVERT() functions).

It sounds like a big query, but we will take it step-by-step and you will see the results in no time!

Este exercício faz parte do curso

Functions for Manipulating Data in SQL Server

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

SELECT 
	first_name,
	last_name,
	gender,
	country
FROM voters
WHERE country = 'Belgium'
	-- Select only the female voters
	AND ___
    -- Select only people who voted more than 20 times   
    AND ___;
Editar e executar o código