Your lead programmer comes to you with a request to list all unique hat styles in the hat database. Unfortunately, hat styles do not have a unique key in this database, and there is no normalized table listing all the different unique hat styles. Instead, all you have is a legacy SQL Server 2012 database, imported from an Excel spreadsheet, with 2 million rows of hat purchase records in a table mysteriously called z007. The table has a column called 'hat_style.' What is the best way to get a list of unique hat styles?
select distinct hat_style from z007 or .... select hat_style from z007 group by hat_style Which is better? It depends. In SQL Server, the two methods typically generate the same query execution plan. However, calculated fields or complex joins or the presence or absence of indexes can all affect the performance of such a query. Performance should not be taken for granted, but tested and optimized on a case by case basis.
In your new job, you have been assigned the task of writing a memo to senior management persuading them to move forward on an important project. What type of diction should you use? Formal, Informal, or Neutral?
It depends. You need to consider your audience. In general, written communication in a business setting should not be cluttered with slang, incomplete sentences, or emoticons. On the other hand, some business executives may be uncomfortable with too much formality. Often, the best approach is a neutral diction, which uses a standard vocabulary and complete, well-structured sentences, but allows common contractions. The correct approach will depend on the specific circumstances.
What is the difference between the Past Simple tense and the Present Perfect tense?
You use the Past Simple tense when all you want to do is show that something happened at some time in the past. That's what makes it "simple." For example: Sam went to the store. You use the Present Perfect when you want to connect some event in the past with some condition in the present. For example: Sam has been to the store three times this week. This is an important difference to English speakers, because it lets them know what you are emphasizing. Are you emphasizing the past event itself, or the present consequences of the event? Bonus pointer: The name of the tense, Present Perfect, can be misleading. In this case, "perfect" does not mean "flawless." It means "completed." The event that happened in the past is completed, but it has present consequences.