Free Essay

Enginerring Manager

In:

Submitted By tinapatel84
Words 652
Pages 3
SELECT column_list FROM table-name
[WHERE Clause]
[GROUP BY clause]
[HAVING clause]
[ORDER BY clause];
SELECT name, salary, salary*1.2 AS new_salary FROM employee
WHERE new_salary /salary*1.2 > 30000;
SELECT first_name, last_name, subject
FROM student_details
WHERE subject IN/NOT IN ('Maths', 'Science');

Select * from product p where EXISTS (select * from order_items o where o.product_id = p.product_id)

------------------------------------------------- SELECT user.name, course.name
-------------------------------------------------
FROM `user`
-------------------------------------------------
RIGHT JOIN `course` on user.course = course.id

SELECT name, salary FROM employee ORDER BY 1, 2;
ELECT name, salary
FROM employee
ORDER BY name DESC, salary DESC;
SELECT COUNT (DISTINCT name) FROM employee;
HAVING Group functions (MAX,MIN) cannot be used in WHERE Clause but can be used in HAVING clause.
SELECT dept, SUM (salary)
FROM employee
GROUP BY dept
HAVING SUM (salary) > 25000
INSERT INTO TABLE_NAME
[ (col1, col2, col3,...colN)]
VALUES (value1, value2, value3,...valueN);
INSERT INTO employee (id, name, dept, age, salary location) SELECT emp_id, emp_name, dept, age, salary, location
FROM temp_employee;
Copy data from A to B. Select first then insert
If you are inserting data to all the columns, the above insert statement can also be written as,
INSERT INTO employee
SELECT * FROM temp_employee;

Truncate =delete records
Delete=delete table tempor
Drop=alles tables
DELETE FROM employee WHERE id = 100;
TRUNCATE TABLE table_name;
DROP TABLE table_name;

ALTER TABLE table_name ADD column_name datatype;
ALTER TABLE table_name DROP column_name;
ALTER TABLE table_name MODIFY column_name datatype;
RENAME old_table_name To new_table_name;
The constraints available in SQL are Foreign Key, Not Null,Unique, Check.
Constraints can be defined in two ways
1) The constraints can be specified immediately after the column definition. This is called column-level definition.
2) The constraints can be specified after all the columns are defined. This is called table-level definition.

The Cartesian product returns a number of rows equal to the product of all rows in all the tables being joined. For example, if the first table has 20 rows and the second table has 10 rows, the result will be 20 * 10, or 200 rows. This query takes a long time to execute.

CREATE VIEW view_product
AS
SELECT product_id, product_name
FROM product;
SELECT id, first_name
FROM student_details
WHERE first_name IN (SELECT first_name
FROM student_details
WHERE subject= 'Science');

select p.product_name, p.supplier_name, (select order_id from order_items where product_id = 101) as order_id from product p where p.product_id = 101
SELECT p.product_name FROM product p
WHERE p.product_id = (SELECT o.product_id FROM order_items o
WHERE o.product_id = p.product_id);

* AVG() - Returns the average value * COUNT() - Returns the number of rows * FIRST() - Returns the first value * LAST() - Returns the last value * MAX() - Returns the largest value * MIN() - Returns the smallest value * SUM() - Returns the sum

SQL Scalar functions
SQL scalar functions return a single value, based on the input value.
Useful scalar functions: * UCASE() - Converts a field to upper case * LCASE() - Converts a field to lower case * MID() - Extract characters from a text field * LEN() - Returns the length of a text field * ROUND() - Rounds a numeric field to the number of decimals specified * NOW() - Returns the current system date and time * FORMAT() - Formats how a field is to be displayed * The UNION operator is used to combine the result-set of two or more SELECT statements.

An SQL JOIN clause is used to combine rows from two or more tables, based on a common field between them.
The most common type of join is: SQL INNER JOIN (simple join). An SQL INNER JOIN return all rows from multiple tables where the join condition is met.

* Notice that each SELECT statement within the UNION must have the same number of columns. The columns must also have similar data types. Also, the columns in each SELECT statement must be in the same order.

select top(10) * from Employee
SELECT TOP 1 T.* FROM
(SELECT TOP 5 * FROM DBT_Person ORDER BY AGE ASC) AS T
ORDER BY T.AGE DESC;
5th entry

Similar Documents

Free Essay

All State Insurance Company

...evaluate Allstate’s goal setting process to determine whether or not Allstate has an effective goal-setting program. After comparing the model for goal setting with the steps that Allstate had put into effect, I believe that they do have a successful goal-setting program already established. Nevertheless, when you are trying to make sure that a business is operating as smoothly and efficiently that it can, there will always be room for improvement. One way they could improve is instead of giving, each manage a twenty-five percent of each manager merit pay, and why not break that down to at least five percent for every employee (Hellriegel. 2010). That way even thought the percentage is lower but all the employees would be getting a reward based on the Diversity Index and QLMS. Everyone in the company, no matter what background that that individual may have, needs to feel like what they do for the company is not taken for granted. Managers at this time are receiving a twenty-five...

Words: 1495 - Pages: 6

Free Essay

Conflict of Interest Between Managers and Shareholders

...Corporate managers and shareholders can sometimes find themselves in a conflict of interest. The goal of being a good manager is being able to spot these potential conflicts and to remedy the situation before a serious problem arises. The biggest conflict between managers and shareholders is going to be money. Here is the most common scenario. A corporation is profitable. In fact, the corporation is more profitable than expected. Therefore, the corporation has a cash surplus, if you will. Managers would want this money as a financial bonus and the shareholders would want this money as a stock dividend. What to do? What to do? Mangers will argue that without their leadership and managerial ability, the corporation would not have been as profitable. The shareholders will argue that without their money, the corporation would not have been able to invest in its growth, and therefore, would not have reached that level of prosperity. Who should get the money? Another situation arises when the managers are also shareholders. This may lead a particular manager to push the opposite way of his/her position. For example, if a shareholder manager would get more money from a stock dividend than from a bonus, this shareholder manager might vote in favor of a stock dividend, not because he/she believes that stockholders should be rewarded for their investment, but because it will mean more money for that particular manager. What if only that one manger is a stock holder? Before...

Words: 406 - Pages: 2

Free Essay

Kerala

...3500 2200-75-2800100-3500 2200-75-2800100-3500 1640-60-260075-2900 do 1 Production Manager 1 In charge of Production Plant 21900 2 Asst Manager Production Asst Manager Maintenance Asst Manager Quality Control Jr. Manger (Q.A)- A 4 3 1 4 1 5 1 Supervision of Production Activities 14500 do 14500 do 14500 do 10840 6 Jr. Manger (Q.A)- B 1 MSc (Pharmaceutical 1640-60-2600In charge of Quality Chemistry)/ MSc (Micro Biology) with 2 years 75-2900 Assurance experience in the relevant field. do 10840 7 Jr. Manger (Q.C) 2 B.Pharm with 2 years experience OR Msc. In charge of Quality (Chemistry)with 2 years 1640-60-2600Control 75-2900 experience/ BSc (Chemistry) with 5 to 7 years experience in relevent Field do 10840 STAFF/WORKERS:TECHNICAL 750-40-950-50B.Sc. (Chemistry) with D.Pharm 1200-60-1500Industrial DA Production of Drug and minimum 3 years 70-1990-80based on cost experience in Pharmaceutical Formulations 2390-95-2865- of living Index production 110-3415 630-25-755-30Minimum 10th Standard + ITI in 905-35-1080Production of Drug Fitter/ Machinist Trade with 2 40-1360-45years experience in a Formulations 1585-55-1860Pharmaceutical Company 65-2185 Minimum 10th Standard + ITI in 605-20-705-25Production of Drug Fitter/ Machinist Trade with 1 830-30-950-35Formulations year experience in a 1230-40-1430 Pharmaceutical Company 630-25-755-30Minimum 10th Standard + ITI in 905-35-1080Maintenance...

Words: 637 - Pages: 3

Free Essay

U Go I Come

...Aim for 1 page – this example cover letter is longer because it includes instructions Ms Karen Medica [Address] [Suburb, State, Post Code] [Mobile] [e-mail] [date] 1 November 2010 [Salutation] [first name] [surname] [Position in Company] [Company name] [Address] [Suburb, State, Post Code] Dear [Mr. or Ms.][Last Name], Re: [job name, reference] Customer Service Officer, Position C542 [Write a brief explanation of your experience in the particular field and interest in the role advertised. This section should be limited to one paragraph only.] [Example only] I am writing to express my interest in your advertisement/ current opening for a [……],and submit my résumé for your review. Having served in sales and operational leadership roles for the past 8 years with continued success in meeting business/operational goals, I can make a valuable contribution to your organisation’s future projects and initiatives. I am aware of your products and familiar with your new line of [show you know something about what the organisation does] and believe that I can assist with increasing sales in the area of [again, show you know what they do]. [Sell yourself. Point out why you would be best for the role. Use examples/or use as a guide your current or most recent position. Provide detailed summary of the role’s key responsibilities and accountabilities]. [Example only]What I bring to this position is a combination of team leadership, strategic planning, and business development skills that...

Words: 525 - Pages: 3

Premium Essay

Hrm Excerpt

...workplace by serving as a good manager of people and their unique skillsets. The psychology of human beings cannot be ignored since people are almost certain to act as their nature dictates. In the article reviewed, “The Psychology of Crowds” by Chuck Csizmar, the author explores how herding mentality can act as a hindrance to a manager looking to set them self apart as a leader. Csizmar’s major point was that if you do not want to simply be part of the herd, as a manger you have to learn how not to be a “yes” man. You should get comfortable breaking the mold, because managers who change this mentality are able to make a real difference. The author starts off the article by discussing how when he was a child during recess the children were herded. Then as an adult in the military, during basic army training, drill sergeants crammed them into “cattle cars” to drive them to the different locations for their training. They would often yell “Moo!” to indicate that they felt like a herd. All of these experiences in the author’s life were part of building camaraderie and a spirit of teamwork with others. You feel as though you belong to something and becomes your comfort zone because of that human need to belong. But on the flip side it also caused groupthink and took away feelings of individuality. As the author stated, “the group focus suppresses the individual personality”. The author then goes on to say that when you transition into that role of a manager, you are now responsible...

Words: 363 - Pages: 2

Free Essay

English

...ACKNOWLEDGEMENT God has its own purpose for all of us. He never plans without a purpose. He never sets a life without a promise. As long as we believe in ourselves and be grateful for all the people who contributed so much in our life. I wish to express my sincerest things and gratitude to those people who have helped me to reap the fruits of my success in the training. Mr. Erwin Camarillo, General Manager of the UNION GALVASTEEL for his undying support. Mr. Proland Mangahas, SNF Engineer of the UNION GALVASTEEL for his encouragement and for sharing us his knowledge about the qualities of a good employee and trainee. Mr. Joseph Savellano, former Senior Accountant of the UNION GALVASTEEL for helping us to do the assigned tasks accurately. Ms. Janette de Asis, Cashier of the UNION GALVASTEEL for guiding and leading us to the right way during difficult times. Ms. Gema Bulao, present Senior Accountant for providing us a copy of the history and other related information needed in the preparation of my terminal report. Mr. Roldan B. Eden, Dean of the College of Information and Computing Studies for teaching us the right manners and conduct of a trainee. Mrs. Riche M. Jose, College Computer Laboratory Assistant for inspiring me to go through and pursue my training despite of the problems that I am facing. Ms. Rosemarie B. Gascon, Elementary Computer Laboratory Assistant for assisting me during my training in the school. Above all, the Father Almighty for without Him nothing...

Words: 257 - Pages: 2

Premium Essay

Management

...Scenario I When implementing a specific communication channel, I would recommend downward communication. Downward communication is most effectively used by group leaders and managers communicating with an employee assigned goals, provide job instructions, and also points out problems that need attention. This communication channel can help the marketing manager be more efficient in setting strategic goals with the team members. It can also get her team motivated by her leadership and wisdom as she relates in detail the task at hand. To convey my strategy to the Vice President of Operations, I would use the upward communication channel. Upward communication is the best choice in the marketing manager situation. This type of communication is used to provide feedback to higher- up’s to inform them of progress towards goals, and relay current problems. For this scenario it would effectively help the marketing manager convey updates on the task that was set fourth. By using key headlines and phrases, the Vice President of Operations could better understand the progress of the team and implement changes if needed. Scenario II The communication channel that the manager of the travel agency should utilize is oral communication. Oral communication deals with either face to face or phone communication. .The manager can make an emergency phone call to the IT group and they can walk her through issue with the password and expiration issue. Scenario III Implementing the face to face...

Words: 457 - Pages: 2

Premium Essay

Essay

...Some managers are known for “never having missed a budget target.” Do you believe that is possible? Does such a record suggest that the managers are extremely effective managers; very lucky managers, or devious, manipulative managers? Are such managers to be congratulated (and, possibly or likely, promoted in their organizations) for their budget-achievement record? Almost every business and managers use pre-set performance targets as it stimulates employees, helps evaluate their performance, increases their commitment and reduces the cost of intervention and game-playing. Those targets are defined during the budgeting process which is the third planning cycle and are usually financial. They are typically expressed on an annual basis and are related to the measurement of performance and possible rewards and incentives. Financial targets are fixed in most firms which mean that managers are accountable for achieving their targets regardless to the changing environment during the year. Targets need to be right and set the proper way. They need to be a correct amount of challenge. Indeed, targets need to be achievable otherwise the manager will feel demotivated which is counterproductive. Consequently, achieving a budget target doesn’t only depend on the manager’s performance but also on how the target is set by himself or his superiors. Studies shown that at corporate level, budget targets are set to be achievable 80 to 90 % of the time by an effective management team (Marchant...

Words: 474 - Pages: 2

Premium Essay

My Documents

...000.00 | Raw materials and supplies | Unit Price | Quantity | Total Coast | Fabric | 40.00/yard | 100 yards | 4,000.00 | Threads | 60.00 | 50 | 3,000.00 | Needles | 25.00/box | 50 | 1,250.00 | Total | | | 8,250.00 | Utilities It is necessary for the operation of the business to give importance to the utilities needed in the operation. ITEM | Monthly | SOURCE | Water | 12,000.00/ monthly | water district | Electricity | 15,000\monthly | National Power Corporation | Telephone | 1,000/ monthly | PLDT | Rent | 30,000\monthly | | TOTAL | 58,000.00 | | Compensation Position | Monthly Rate | Yearly Rate | President | 20,000.00 | 240,000.00 | General Manager | 15,000.00 | 180,000.00 | Finance Manger | 12,000.00 | 144,000.00 | Marketing Manager | 12,000.00 | 144,000.00 | Production Manager | 13,000.00 | 156,000.00 |...

Words: 460 - Pages: 2

Premium Essay

Wk 3 Assignment

...Touchdown will ensure that all laws and regulations of Technology Cowboys’ internal rules and regulations are updated.   This will be the foundation for all business activities within our organization. This newly incorporated compliance system, Touchdown, will become the stepping stone of our understanding of integrity. Project Stakeholders Stakeholders in this project are the company’s managers and employees.   Each member will be slowly introduced to the new compliance system. There will be requirements for managers. One requirement for managers is to train at least 10 hours on the new platform. They will also be responsible for training on a host of new compliance policies.   The new platform will integrate the all offices across the company, into a common database. The database may be used to access data stored in several database tables that the company must create and configure. Overall Objectives The overall objective of this new and improved compliance system is to ensure that all policies and regulations are being followed correctly by the company managers and employees. If each manager and employee follow the newly implemented policies, the compliance system will be set up to be successful....

Words: 374 - Pages: 2

Premium Essay

Ethical Issues

...Managers and what they go through Amber Pease South University Online Instructor: Antoinette Kohlman Managers and what they go through Being a Manager at Kroger entails a lot of work. A manager must be able to plan for the future effectively and be able to predict what would be the best decision for the store and the business to be both productive and run like it is supposed to. A manager must be able to set up resources that will help the company achieve the plans that will better the business as a whole. Even through the business part of being a manger, a manager must also step up and build positive relationships with all of the workers, make sure that the workers are aware of the plans to better the business and how they can help to obtain the goals of the business. When a manager makes plans for the future the manager must analyze the current situation of the company and develop goals to help the company strive to be better. After the goals are made up then the manager must evaluate and implement a plan to take action on the goals that will make the business better for the company. While the actions are taken place on the plans for a better business, then manager must then receive and monitor feedback from the course of action taken to see what should be done next. If the manager receives good feedback than the decisions made were obviously good ones, if the feedback was not good than a different course of action needs to be planned. If the feedback was both...

Words: 1030 - Pages: 5

Premium Essay

Misunderstandings

...Business Communication 275 Kohl Fiarri 7 August, 2013 Week 1 Assignment 1.1 Choose 2 misunderstandings you experienced and fill out the chart for these. Message: (manager channel) “you are being insubordinate” Encode/negative comment Decode/joking Sender/supervisor receiver/myself Decode/misunderstanding Encode/misspoke Feedback- manger, supervisor, myself in office discussion First misunderstanding example took place on one of my last days of work where I was called into the office by my manager. The manager had heard a message from one of his supervisors that I made a negative comment during work. The supervisor contacted the manager and he called me into the work office. I came in, sat down and was told that I was being negative at work that day and that I must be unhappy. The manager proceeded to tell me what he had heard I had said from the supervisor on duty. The comment that I made was somewhat negative yet I had meant it as a joke. The supervisor heard it differently, not as a joke and was upset. So the comment that I had said was misunderstood first by my supervisor and then she proceeded to tell the manager my comment what she conveyed her perception of what I said rather than what I meant. The comment became all misconstrued by the time I went into the office. We all sat down. I was told what I did wrong before I had a chance to give...

Words: 500 - Pages: 2

Premium Essay

Thesis

...to find the Significance of personality enhancement to the employability of hotel and restaurant graduates a four-year or a two-year concentration in Hotel and Restaurant Management is designed to prepare successful graduates for management positions in the field. Managers in the hotel and restaurant industry are generally responsible for keeping their establishment efficient and profitable while maximizing comfort of guests. This includes overseeing many aspects of the business including staffing and personnel, accounting, purchasing, and customer service. A hotel manager is responsible for coordinating registration, housekeeping, and maintenance activities, and may also coordinate special events, banquets, or conventions. This person will also decide on and arrange for outside services such as deliveries, laundry, trash collection, maintenance, and repairs. A restaurant manager must carefully observe food preparation, and may be responsible for ordering appropriate amounts of food and ensuring quality of inventory as well as coordinating and maintaining menus. Additionally, they are responsible for maintaining sanitation standards in the kitchen and dining areas. Restaurant managers will also decide on and arrange for outside services such as deliveries, laundry, trash collection, maintenance, and repairs. In the field personality enhancement is needed to be prioritized. Some students can’t catch up to that thing that’s why some that is in the field...

Words: 320 - Pages: 2

Premium Essay

Performance Review

...potential lawsuits. Which is why these perfomance reviews are addressed and proper steps to completing this review is necessary. Performance reviews can help the employee imporve their development skills and will give the employee a chance to address their own concerns. The primary goal of any appraisal system is performance management. To manage and improve their employees’ performance, managers must explore the causes of performance problems, direct manager and employee attention to those causes, develop action plans and empower workers to find solutions, and use performance-focused communication. Generally speaking a good performance assesment no matter what kind it is,is efficient if it is carried out in a proper manner when everything is openly explained to the employees and agreed with the administration.Performance assesments can be productive especially for those employees who can improve their development skills and with guidence. Meaning everyone learns in their own way, with that in mind if an employee has concerns the manger will know what steps need to be taken. I think as a manager it is important that they take the time to really know about their staff. While keeping in mind that everyone makes mistakes and it's ok,...

Words: 332 - Pages: 2

Premium Essay

Kudler Problem Statement

...all aspects of the business even though she has a manager at each location that would be capable of taking on additional duties. She is working herself to the bone and could use a few days off here and there. If Kathy could let go and give each of her managers a little more responsibility she would be able to focus on opening new stores and also have a few days off. Frame the “Right” Problem: The problem here is that Kathy is taking on too much responsibility for one person to handle alone. One person cannot run a multiple store operation on their own. Describe the End-State Goals from a Broad Perspective of Values: In the end it would be best for Kathy to rely on her managers at each store location a little more. We feel that Kathy is taking on more than she can handle or for that matter that the company itself can handle. If she were to become sick or for that matter become unavailable to work there is really no one in the company that would be able to take on her duties. She has to get information to the managers in order for them to take on the responsibility for their locations. Identify the Alternatives: 1.) If Kathy does not feel comfortable giving the current managers more responsibility then she should conduct interviews and hire new managers for those locations in order to take some stress away from her. 2.) Kathy should spend quality time at each store instead of rushing in and out and allow the store managers to shadow what she does throughout the day. In order...

Words: 754 - Pages: 4