INSERT INTO newtablename
(SELECT id, objectid, lastname, firstname, middlename, position, status, personnelnumber, organization_id
FROM tablename AS t1
WHERE t1.objectid = (SELECT max( t2.objectid ) FROM tablename AS t2 WHERE t1.personnelnumber = t2.personnelnumber)
GROUP BY personnelnumber, id, objectid, lastname, firstname, middlename, position, status, organization_id)
INSERT INTO …
SELECT …
INNER JOIN ( SELECT personnelnumber, MAX(objectid) … GROUP BY personnelnumber ) …
Каждый день одно и тоже.SELECT reg_num, MAX( date_creation ) FROM YourTable GROUP BY reg_num
id этого объекта получить?
SELECT id, YourTable.reg_num, YourTable.date_creation
FROM YourTable INNER JOIN
( SELECT reg_num, MAX( date_creation ) AS MaxDate FROM YourTable GROUP BY reg_num ) AS M
ON M.reg_num = YourTable.reg_num AND M.MaxDate = YourTable.date_creation
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.TokenAuthentication',
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
)
}
url(r'^api/v1/auth/', include('djoser.urls')),
url(r'^api/v1/auth/', include('djoser.urls.authtoken')),
url(r'^api/v1/auth/', include('djoser.urls.jwt')),
EMAIL_HOST = 'localhost'
EMAIL_PORT = 1025
EMAIL_USE_TLS = False
EMAIL_USE_SSL = False
python -m smtpd -n -c DebuggingServer localhost:1025
Можно ли как-нибудь убрать скролл на устройствах с дисплеями меньше 380рх?