我需要创建一个像这样运行的查询;所有受教育程度为18或20的员工将获得1200加薪,奖金将减半。列出这些员工的姓名,教育程度,新工资和新奖金。对生成的列使用名称NEW_SALARY和NEW_BONUS
新工资=工资+ 1200(我怎么能这样做?) 新奖金=奖金/ 2(我怎么能这样做?
答案 0 :(得分:0)
承担很多事情之后::
var express = require('express');
var router = express.Router();
var pythonshell = require('python-shell');
pythonshell.defaultOptions = { scriptPath: '/path/to/myscript.py' };
var outputString = '';
var options = {args: ['-p', '/path/to/image.jpg']}
var pyshell = new pythonshell('myscript.py', options);
pyshell.on('message', function(message) {
// received a message sent from the Python script
console.log(message);
outputString = message;
});
pyshell.end(function(err) {
// This is where the error occurs
if (err) throw err;
console.log('Picture analysis complete');
console.log('outputString: ' + outputString);
});