PostgreSQL
1. Write a query to join two tables employees and departments to
display the department name, first_name and last_name, hire date,
and salary for all managers who have more than 15 years of
experience.
2. Write a query to join the employees and departments table to find the name of the employee including the name and last name, department ID and department name.
3. Write a SQL query to join three tables of employees, departments, and locations to find the names, including first and last name, job title, department name and ID, of employees working in London.
4. Write a query to concatenate the two tables of employees and yourself to find the employee id, last_name as Employee, and their manager_id and last name as Manager.
5. Write a query to connect to the employee table and to yourself to find the name, including first_name and last_name, and the hiring date for those employees who were hired after employee Jones.
6. Write a query to combine the two employee and department tables to get the department name and the number of employees working in each department.
7. Write a query to find employee ID, title and number of days he worked, who worked in department with ID 90.
8. Write a query to combine the two employee and department tables to display the department ID, department name, and manager name.
In: Computer Science
Equipment is purchased on July 1, 2011 for $250,000. The estimated salvage value and useful life are $25,000 and 5 years, respectively. What is the depreciation expense for 2012 under: (1) straight-line method, (2) sum-of-years-digits method, and (3) double-declining balance method
The answer is S-L: 45,000 DDB: 80,000SYD:67,500
Can you please explain step by step solution.
In: Accounting
Compare and contrast the three corporate concentration strategies. Identify a struggling company that could benefit from one of these strategies? What might you advise this company’s executives to do differently? Clearly show the reasons you consider the firm to be struggling and link these reasons to your advice.
In: Operations Management
1- Write a c++ program that asks the user to enter
his/her name using one variable only. The name must
be then printed out in capital letter with the family name first
and the last name second.
In: Computer Science
In: Operations Management
I need a positive feedback about the common below made by my classmate.
For example, Apple does business globally. Their main supplier was Foxconn in China, this changed in 2010 when they were accused of low wages, long hours, poor working and living conditions basically sweatshop conditions and it backlashed. Now Apple has diversified their suppliers
In: Operations Management
# columns are [0]title [1]year [2]rating [3]length(min) [4]genre
[5]budget($mil) [6]box_office_gross($mil)
oscar_data = [
["The Shape of Water", 2017, 6.914, 123, ['sci-fi', 'drama'], 19.4,
195.243464],
["Moonlight", 2016, 6.151, 110, ['drama'], 1.5, 65.046687],
["Spotlight", 2015, 7.489, 129, ['drama', 'crime', 'history'],
20.0, 88.346473],
["Birdman", 2014, 7.604, 119, ['drama', 'comedy'], 18.0,
103.215094],
["12 Years a Slave", 2013, 7.71, 133, ['drama', 'biography',
'history'], 20.0, 178.371993],
["Argo", 2012, 7.517, 120, ['thriller', 'drama', 'biography'],
44.5, 232.324128],
["The Artist", 2011, 7.942, 96, ['drama', 'melodrama', 'comedy'],
15.0, 133.432856],
["The King\'s Speech", 2010, 7.977, 118, ['drama', 'biography',
'history'], 15.0, 414.211549],
["The Hurt Locker", 2008, 7.298, 126, ['thriller', 'drama', 'war',
'history'], 15.0, 49.230772],
["Slumdog Millionaire", 2008, 7.724, 120, ['drama', 'melodrama'],
15.0, 377.910544],
["No Country for Old Men", 2007, 7.726, 122, ['thriller', 'drama',
'crime'], 25.0, 171.627166],
["The Departed", 2006, 8.456, 151, ['thriller', 'drama', 'crime'],
90.0, 289.847354],
["Crash", 2004, 7.896, 108, ['thriller', 'drama', 'crime'], 6.5,
98.410061],
["Million Dollar Baby", 2004, 8.075, 132, ['drama', 'sport'], 30.0,
216.763646],
["The Lord of the Rings: Return of the King", 2003, 8.617, 201,
['fantasy', 'drama', 'adventure'], 94.0, 1119.110941],
["Chicago", 2002, 7.669, 113, ['musical', 'comedy', 'crime'], 45.0,
306.776732],
['A Beautiful Mind', 2001, 8.557, 135, ['drama', 'biography',
'melodrama'], 58.0, 313.542341],
["Gladiator", 2000, 8.585, 155, ['action', 'drama', 'adventure'],
103.0, 457.640427],
["American Beauty", 1999, 7.965, 122, ['drama'], 15.0,
356.296601],
["Shakespeare in Love", 1998, 7.452, 123, ['drama', 'melodrama',
'comedy', 'history'], 25.0, 289.317794],
["Titanic", 1997, 8.369, 194, ['drama', 'melodrama'], 200.0,
2185.372302],
["The English Patient", 1996, 7.849, 155, ['drama', 'melodrama',
'war'], 27.0, 231.976425],
["Braveheart", 1995, 8.283, 178, ['drama', 'war', 'biography',
'history'], 72.0, 210.409945],
["Forrest Gump", 1994, 8.915, 142, ['drama', 'melodrama'], 55.0,
677.386686],
["Schindler\'s List", 1993, 8.819, 195, ['drama', 'biography',
'history'], 22.0, 321.265768],
["Unforgiven", 1992, 7.858, 131, ['drama', 'western'], 14.4,
159.157447],
["Silence of the Lambs", 1990, 8.335, 114, ['thriller', 'crime',
'mystery', 'drama', 'horror'], 19.0, 272.742922],
["Dances with Wolves", 1990, 8.112, 181, ['drama', 'adventure',
'western'], 22.0, 424.208848],
["Driving Miss Daisy", 1989, 7.645, 99, ['drama'], 7.5,
145.793296],
["Rain Man", 1988, 8.25, 133, ['drama'], 25.0, 354.825435],
]
def column_sum(data, column):
result = 0
for row in data:
result += row[column]
return result
def column_mean(data, column):
total = column_sum(oscar_data, 6)
mean = total / len(data)
return mean
# < write code here >
mean_score = column_mean(oscar_data, 2)
print('Average rating: {:.2f}'.format(mean_score))
mean_length = column_mean(oscar_data, 3)
print('Average length: {:.2f} min.'.format(mean_length))
mean_budget = column_mean(oscar_data, 5)
print('Average budget: ${:.2f} mil.'.format(mean_budget))
mean_gross = column_mean(oscar_data, 6)
print('Average revenue: ${:.2f} mil.'.format(mean_gross))
In: Computer Science
Many have thought that if we don't have free will, then punishment and reward would not make sense. Do you agree with this? Why or why not? Would be good to do away with punishment? Why or why not? (Consider: Punishment can be used for retribution, i.e., as giving a person their just deserts, but it can also be used as a deterrent. Reward can be used to recognize a person's accomplishment because they deserve it, but it can also be used to motivate them to do certain things). Write at least one paragraph in your initial post
In: Psychology
two pages paper on any topic related to HR and what you have learned and how you will take this knowledge into your future career.
In: Operations Management
How do organizations decide and adopt emerging technologies today?
What have you observed? In your our own organization? Anywhere else? The way they decide, does it work?
In: Operations Management
2. The early Milesians (Thales, Anaximander, Anaximenes) each sought an arche as the foundation for existence. Beginning with an explanation of how Thales derived his solution to the question “What is real?” detail the arche of each. This should include an examination of why each found his predecessors solution problematic.
In: Psychology
Question 1
Given two integers x and y, the following recursive definition
determines the greatest common divisor of x and y, write gcd(xy).
Write a recursive function, gcd, that takes two integers as
parameters and returns the greatest common divisor of numbers. Also
write a program to test your function. Write a recursive function,
reverseDigits, that takes an integer as a parameter and returns the
number with the digits reversed. Also write a program to test your
application.
In: Computer Science
A course consists of many subjects, but each subject can only be associated with one course. Each subject is co-ordinated by a lecturer and each lecturer can co-ordinate many subjects. Subjects and courses are identified by subject and course codes, and have a name. Lecturers are identified by an ID and have a name, room number and telephone contact number
.a. Using Enterprise Architect, create an ERD representing the above scenario. You need to include the cardinality of the relationships.
b. Transform the ERD to a set of relational tables.
In: Computer Science
A)How does contractionary monetary policy use interest rates and required reserves to achieve its goals of reducing inflation? Answer:
B) The Fed is the most independent federal agency there is, with loyalty first to the American public and the wellbeing of its economy, but just how truly independent is it from the political motives of politicians, especially from those of White House’s? Answer:
In: Economics
Write an ALP to control the different direction of rotation of stepper motor
Stepper motor has the following specifications
Stepper motor has 4 windings
Speed =12 rpm
No of teeth =200
In: Computer Science