text
stringlengths
6
9.38M
-- MySQL dump 10.13 Distrib 5.6.21, for Win32 (x86) -- -- Host: localhost Database: pizza -- ------------------------------------------------------ -- Server version 5.6.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101...
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 09, 2019 at 12:46 AM -- Server version: 8.0.13 -- PHP Version: 7.1.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Client: 127.0.0.1 -- Généré le: Ven 01 Février 2019 à 21:59 -- Version du serveur: 5.5.27-log -- Version de PHP: 5.4.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
select * from dw_abtestdb.factabtestingserver AB实验查看数据 - CR:人均订单数量 - GP:人均订单利润 - GP-C:人均订单利润-人均订单优惠(包含不判断是否使用的优惠券和消费券) - GMB:人均订单金额 - Quantity:人均订单间夜数 - PV:人均访问页面数 汪奇: Dw_pubsharedb.factpromotion_BNB Dw_pubsharedb.factcoupon_BNB Dw_pubsharedb.FactCouponOrdDetail_BNB 汪奇: 这三张表是关于优惠券的 --任务 新首页:180511_bnbHybrid_msxsy - ...
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th5 30, 2018 lúc 04:10 PM -- Phiên bản máy phục vụ: 10.1.31-MariaDB -- Phiên bản PHP: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
-- Complain if script is sourced in psql, rather than via CREATE EXTENSION. \echo Use "CREATE EXTENSION bottledwater" to load this file. \quit CREATE OR REPLACE FUNCTION bottledwater_key_schema(name) RETURNS text AS 'bottledwater', 'bottledwater_key_schema' LANGUAGE C VOLATILE STRICT; CREATE OR REPLACE FUNCTION b...
CREATE TABLE [Credentials].[Twitter] ( [Id] INT IDENTITY (3000000, 1) NOT NULL, [UserId] INT NULL, [TwitterUserId] VARCHAR (255) NULL, [TwitterAccessToken] VARCHAR (255) NULL, [TwitterDisplayName] VARCHAR (100) NULL, PRIMARY KEY CLUSTERED ([I...
DROP TABLE IF EXISTS users, manufacturers, customers, items, purchase_orders, sales_orders; CREATE TABLE users ( id serial PRIMARY KEY, first_name varchar(100) NOT NULL, last_name varchar(100) NOT NULL, email varchar(100) NOT NULL, address text NOT NULL ); CREATE TABLE manufacturers ( id...
INSERT INTO USERS (ID, USERID) VALUES (2, 'sbai.com');
/* A more complicated update Write a procedure which updates the salaries of some employees in the following way: Take the employee on each department whose hiredate was the oldest. Increase the salary of these employees by n*100 where n is the number of other employees on that department (besides the firstly hir...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 31, 2017 at 12:23 AM -- Server version: 10.1.28-MariaDB -- PHP Version: 7.1.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
insert into YKT_CUR.T_PIF_TRADECODE (TRADECODE, TRADEMSG, SPLITCFG, FLAG) values (847137, '扣款下发', null, null); insert into YKT_CUR.T_PIF_DICTIONARY (DICT_NO, DICT_VALUE, DICT_NAME, DICT_CAPTION) values (47, '0225', '三九机型代码', '补助机'); insert into YKT_CUR.T_PIF_SYSKEY (KEY_CODE, KEY_NAME, KEY_VALUE, MAX_VALUE, KEY_T...
delete from dms.dealer_streaming_poc where dealer_code = '{{dealer_code}}'
/** * Tributario */ select fc_executa_ddl('CREATE SEQUENCE zonassetorvalor_j141_sequencial_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1;'); select fc_executa_ddl('CREATE TABLE zonassetorvalor( j141_sequencial int4 NOT NULL default nextval(\'zonassetorvalor_j141_sequencial_seq\'), j141_a...
create table WEB_BLOGPOST ( id BIGINT IDENTITY(1, 1) not null, text ntext, title nvarchar(1024), tag nvarchar(1024), CreatedBy_Emp_ID BIGINT, createdTime DATETIME, LastUpdatedBy_Emp_ID BIGINT, lastUpdatedTime DATETIME, PRIMARY KEY (id) ); ALTER TABLE WEB_BLOGPOST ADD CONSTRAINT FK_BLOGP...
CREATE TABLE prices ( product_id INT, start_date DATE, end_date DATE, price INT, ); CREATE TABLE unitssold ( product_id INT, purchase_date DATE, units INT, );
-- bind var is :v_sqltempfile -- beware of this - there is no way to track the previously assigned value whenever sqlerror exit 1 set feed off begin -- this will raise a sqlplus error if the variable was not set in save-sqlplus-settings.sql -- there is no method to trap sqlplus errors from within a sql script -- ...
CREATE DATABASE db_ordemServico; USE db_ordemServico; CREATE TABLE tb_Servico( id INT NOT NULL PRIMARY KEY IDENTITY(1,1), cliente VARCHAR NOT NULL, respTecnico VARCHAR NOT NULL, descricao TEXT NOT NULL, diagTecnico TEXT NOT NULL, abertura DATETIME NOT NULL, fechamento DATETIME NOT NULL );
DROP VIEW s_work; DROP VIEW s_track; DROP VIEW s_release_group; DROP VIEW s_first_release_country; DROP VIEW s_release_country; DROP VIEW s_release; DROP VIEW s_recording; DROP VIEW s_label; DROP VIEW s_artist_credit_name; DROP VIEW s_artist_credit; DROP VIEW s_artist;
/* 10. Crie um usuário chamado empresa_admim_local para o banco de dados EmpresaDB. Este usuário deve ter todos os privilégios mas sem acesso remoto. Chequei o PostgreSQL e ele aparenta não ter a função de fazer um usuário acessar um banco de dados apenas pelo localhost, por isso, coloquei os dois códigos, um em m...
ALTER TABLE `dimHora` CHANGE `id_hora` `id_hora` VARCHAR(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL; CREATE INDEX princ ON dimBase(id_base); CREATE INDEX princ ON dimCodigo(id_codigo); CREATE INDEX princ ON dimDesenlace(id_desenlace); CREATE INDEX princ ON dimHora(id_hora); CREATE INDEX prin...
-- Aug 9, 2009 1:36:21 PM EEST -- [2833789] - concat instead of contac UPDATE AD_Element SET Description='The user/contact has full access to Business Partner information and resources',Updated=TO_DATE('2009-08-09 13:36:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=2835 ; -- Aug 9, 2009 1:36:22 P...
USE [001] SELECT DISTINCT TOP (100) PERCENT oh.ord_no AS [Order], MAX(oh.cus_no) AS Customer, ol.item_no AS Item, ol.qty_to_ship AS [QTY Shipped] , MAX(ol.qty_ordered) AS [QTY Ordered], MONTH(MAX(oh.ord_dt)) AS [Order Month], MAX(oh.ord_dt) AS [Order Date], MAX(oh.oe_po_no) AS PO, 'INVOIC...
with `wnation` as (select `n_nationkey`, `n_regionkey` from `nation`), `wregion` as (select `r_regionkey`, `r_name` from `region`) (select `n`.`n_nationkey`, `r`.`r_regionkey` from `wnation` as `n` inner join `wregion` as `r` on `n`.`n_regionkey` = `r`.`r_regionkey` where `r`.`r_name` = 'africa')
SELECT campaignId, campaignName,publisherId, publisherName,channelId, channelName,placementId, placementName,hitDate, startDate, endDate, hitMonth, hitYear, FORMAT(100*VVIC.inView1qPct*VVIC.scaleFactor, 2) as inView1qPct, FORMAT(100*VVIC.completed1qPct*VVIC.scaleFactor, 2) as completed1qPct, FORMAT(100*VVIC...
CREATE PROCEDURE [sp_insert_City] ( @CityName_2 [nvarchar](50), @DistrictID Integer = 0, @StateID Integer = 0, @Active Integer = 0, @STD nvarchar(50) = 0) AS INSERT INTO [City] ( [CityName], [DistrictID], [StateID], [Active], [STDCode]) VALUES (@CityN...
CREATE SCHEMA IF NOT EXISTS `VillainFinanceGroupDB` DEFAULT CHARACTER SET utf8 ; USE VillainFinanceGroupDB; DROP TABLE IF EXISTS customer; DROP TABLE IF EXISTS employee; DROP TABLE IF EXISTS agreement; DROP TABLE IF EXISTS agreement_extension; DROP TABLE IF EXISTS communication; DROP TABLE IF EXISTS tranche; DROP TABLE...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 02-12-2020 a las 01:29:20 -- Versión del servidor: 10.4.13-MariaDB -- Versión de PHP: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
create or replace package body PK_T002_PROYECTO is -- Funciones y Procedimientos del paquete PROCEDURE Pr_Insertar (p_A002NOMBRPROYCT IN GPYT_T002_PROYECTO.A002NOMBRPROYCT%TYPE, p_A002DESCRPCINPROYCT IN GPYT_T002_PROYECTO.A002DESCRPCINPROYCT%TYPE, p_A002TIPPROYC...
CREATE TABLE `web2020_student` ( `id` int NOT NULL AUTO_INCREMENT, `studentNo` varchar(50) NOT NULL COMMENT ' 学号', `studentName` varchar(100) NOT NULL COMMENT '姓名', `gender` int NOT NULL COMMENT '性别 0女,1男', `code` varchar(10) NOT NULL COMMENT '随机校验码', `year` int NOT NULL COMMENT '入学年月', `roomstatus` int N...
DROP TABLE IF EXISTS `useremergencycontacts`; CREATE TABLE `useremergencycontacts` ( `id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `fullName` VARCHAR(80), `phone` VARCHAR(18), `relationship` VARCHAR(18), `userid` INT DEFAULT NULL, `createdat` DATETIME, `updatedat` DATETIME, `deletedat` DATETIME, ...
--Half done-Need to do the distinct branches select cname from account where bname in ( select account.bname from account,branch where cname in ( select cname from account group by cname having count(cname)=2 ) and lower(bcity)='edina' and account.bname=branch.bname ) group by cname having c...
CREATE VIEW [V_SpecialCategory_item] ([Special_Cat_Code],[Product_Code],[CategoryID],[PrimaryUOM]) AS Select cast(SubGrp.GroupID as varchar(5))+cast(TSI.SchemeID+10000 as varchar(10)) ,TSI.Product_code ,TSI.CategoryID ,(Case Isnull(TSSD.UOM, 0) when 1 then TSI.UOM when 2 then TSI.UOM1 when 3 then TSI.UOM2 when 4 then...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 02-Jul-2021 às 12:12 -- Versão do servidor: 10.4.17-MariaDB -- versão do PHP: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
---------------------------------------------------- -- Autor: Eric Gustavo Coronel Castillo -- Blog: gcoronelc.blogspot.com -- Email: gcoronelc@gmail.com -- Youtube: https://goo.gl/9GFBaC ---------------------------------------------------- create or replace view v_cliente as select chr_cliecodigo ...
IF NOT EXISTS (SELECT 1 FROM [User].Roles) BEGIN INSERT INTO [User].Roles VALUES ('C5F809AF-484D-4100-A793-2690F17BA837', 'Admin'), ('C5F809AF-484D-4100-A793-2690F17BA838', 'User') END
DROP DATABASE IF EXISTS burger_db; CREATE DATABASE burger_db; USE burger_db; DROP TABLE IF EXISTS burgers; -- Store the answers as JSON string in database CREATE TABLE burgers ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(30) NOT NULL, isDevoured Boolean NOT NULL, primary key(id) );
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 26, 2015 at 03:10 AM -- Server version: 5.5.43-0ubuntu0.14.04.1 -- PHP Version: 5.6.10-1+deb.sury.org~trusty+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
-- TITLE1: Capture - Required Redolog -- TITLE2:Displaying the Redo Log Files that Are Required by Each Capture Process -- DESC:A capture process needs the redo log file that includes the required checkpoint SCN, and all subsequent redo log files. set linesi 120 trimspool on COLUMN CONSUMER_NAME HEADING 'Capture|Proc...
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 17, 2019 at 05:40 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
CREATE OR REPLACE VIEW RLARP.VW_FFOPOR ( DCODAT , ORD_PERD , DDQDAT , REQ_PERD , DCMDAT , PRO_PERD , PROM_PERD , DCPO , DCPROM , DDORD# , DDITM# , DCSTAT , DDITST , CALC_STATUS FOR COLUMN CALC_00001 , DDQTOI , DDQTSI , QTY_I , DCCURR , DCBCUS , DCSCUS , PLNT , DDPART , DDGL...
DROP PROCEDURE IF EXISTS Test_ConfirmFriendRequest; DELIMITER @@ CREATE PROCEDURE Test_ConfirmFriendRequest (IN requestor_alias VARCHAR(20), IN requestee_alias VARCHAR(20)) BEGIN /* add friendship between requestor_alias and requestee_alias, assuming that friendship was requested previously */ UPDATE Friend SET Friend...
alter table college add column latitude float default null; alter table college add column longitude float default null; alter table college add column gmap_lat_long_address text; alter table college add column is_usa integer default 0;
//1 SELECT b.title, p.contact, p.phone FROM books b, publisher p WHERE b.pubid = p.pubid; //2 SELECT c.firstname, c.lastname, o.order# FROM customers c, orders o WHERE c.customer# = o.customer# AND o.shipdate IS NULL ORDER BY o.orderdate; //3 SELECT DISTINCT c.lastname, c.customer# FROM books b...
-------------------------------------------------------- ------ DDL for Table DEVICE -------------------------------------------------------- CREATE TABLE `DEVICE` ( `DEVICE_ID` int(11) NOT NULL AUTO_INCREMENT, `DEVICE_TYPE` varchar(40) DEFAULT NULL, `DEVICE_MAKE` varchar(40) DEFAULT NULL, `DEVICE_MODEL` varch...
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 02, 2019 at 05:40 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
-- Up CREATE TABLE IF NOT EXISTS ServerConfig (ID TEXT, Stars TEXT, Modlog TEXT, ModlogCount INTEGER); CREATE TABLE IF NOT EXISTS Stars (MessageID TEXT, GuildID TEXT, Message TEXT, Stars INTEGER); -- Down DROP TABLE IF EXISTS ServerConfig; DROP TABLE IF EXISTS Stars;
INSERT INTO role (role, description, uuid) VALUES ("Admin", "CCC System Administrator role", (SELECT UUID())); START TRANSACTION; SELECT user_id INTO @user_id FROM users WHERE username = 'admin'; DELETE FROM user_role WHERE user_id = @user_id; INSERT INTO user_role VALUES (@user_id, "Admin"), (@user_id, "Nurse"), ...
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 05, 2018 at 01:45 PM -- Server version: 5.6.26 -- PHP Version: 5.5.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
REM ------------------------------------------------------------------------ REM REQUIREMENTS: REM SELECT on V$ REM ------------------------------------------------------------------------ REM PURPOSE: REM Show locking sessions REM ------------------------------------------------------------------------ set li...
/* 客户寄样 */ delimiter $ drop trigger if exists Tgr_SendSamples_AftereDelete $ create trigger Tgr_SendSamples_AftereDelete after delete on SendSamples for each row begin call Proc_Customers_LastSend(old.PartnerNo);-- 客户资料-最近寄样 end$ /*恢复结束符为;*/ delimiter ;
INSERT INTO bpk_account_debit_detail(receipt_id, receive_date, receive_time, hn, vn, visit_id, visit_spid, visit_date, visit_time, fix_visit_type_id, base_patient_type_id, financial_discharge, financial_discharge_date, financial_discharge_time, main_doctor_id, patient_name, fix_receipt_type_id, receipt_type_description...
INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v9.8.15'); INSERT INTO "metadata" VALUES('EPSG.DATE', '2020-08-02');
DROP DATABASE IF EXISTS DBDELEGACIA; CREATE DATABASE DBDELEGACIA; USE DBDELEGACIA; CREATE TABLE CRIME ( IDCRIME INT NOT NULL, DESCRICAO VARCHAR(255), RUA VARCHAR(100), NUMERO INT, COMPLEMENTO VARCHAR(255), BAIRRO VARCHAR(100), CEP VARCHAR(8), CIDADE VARCHAR(100), ESTADO CHAR(2) ); CREATE TABLE CRIMINOSO( R...
CREATE procedure spc_claims (@Start_Date datetime, @End_Date datetime) as select ClaimID, ClaimDate, ClaimsNote.CreationDate, Vendors.AlternateCode, ClaimType, Status, DocumentID, ClaimValue, SettlementType, SettlementDate, SettlementValue, DocumentReference From ClaimsNote, Vendors Where Claimdate Between @Start_Dat...
--Created: 09/01/11 By: BG --Last Updated: 9/4/13 By: BG --Purpose: Archiving chunks of table data into archival tables stored in BG_Backup, then purging the archived data from the active tables --Last Change: -- BEGIN TRAN --DELETE --SELECT * --INTO [BG_Backup].dbo.[wspikpak_2011_2012] FROM wspikpak ...
/*All User's are stored in APP_USER table*/ create table APP_USER ( id BIGINT NOT NULL AUTO_INCREMENT, sso_id VARCHAR(30) NOT NULL, password VARCHAR(100) NOT NULL, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL, email VARCHAR(30) NOT NULL, state VARCHAR(30) NOT NULL, PRIMARY KE...
CREATE TABLE IF NOT EXISTS movie_info( movie_uuid UUID, info JSONB NOT NULL, PRIMARY KEY (movie_uuid) );
-- phpMyAdmin SQL Dump -- version 4.4.15.7 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1:3306 -- Время создания: Фев 09 2017 г., 15:23 -- Версия сервера: 5.5.50 -- Версия PHP: 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
-- phpMyAdmin SQL Dump -- version 3.3.9 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jul 17, 2011 at 12:01 PM -- Server version: 5.5.12 -- PHP Version: 5.3.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_S...
DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(8) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(25) NOT NULL, `age` int NOT NULL, `is_admin` bit NOT NULL DEFAULT 0, `created_date` timestamp NOT NULL DEFAULT now(), PRIMARY KEY (`id`) )DEFAULT CHARSET=utf8; INSERT INTO `user`(`name`, `age`, ...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 04, 2020 at 07:33 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
grant select on gha_last_computed to "devstats_team"; grant select on gha_last_computed to "ro_user";
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 12, 2020 at 05:43 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
SELECT spc-history.uuid AS spc-history_uuid, spc-history.work_order_op_history_uuid AS spc-history_work_order_op_history_uuid, spc-history.tenant_id AS spc-history_tenant_id, spc-history.create_time AS spc-history_create_time, spc-history.update_time AS spc-history_update_time, spc-hist...
.mode column .headers on SELECT id,title,price FROM book ORDER BY price DESC;
-- In some tables there are added version field that indicates the version of -- given data. It is necessary because of data changes in time. -- table of features for E. Ferrara bot detection technique. -- all the fields are corresponding the once declared in Twitter API -- https://developer.twitter.com/en/docs/tweets...
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 09, 2016 at 06:51 AM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
DROP TABLE IF EXISTS users CASCADE; DROP TABLE IF EXISTS posts CASCADE; DROP TABLE IF EXISTS resources CASCADE; DROP TABLE IF EXISTS favourites CASCADE; CREATE TABLE users ( id SERIAL PRIMARY KEY NOT NULL, name VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL ); CREATE TABLE...
CREATE TABLE archive_identifier ( message_id REFERENCES message (message_id) ON DELETE CASCADE, jid TEXT, uid TEXT, timestamp REAL ); CREATE UNIQUE INDEX archive_identifier_jid_uid ON archive_identifier (jid, uid);
# --- !Ups CREATE TABLE "account" ( "name" varchar(200) PRIMARY KEY, "password" varchar(200) ); INSERT INTO "account" values ('orestis', '1234'); CREATE TABLE "book" ( "title" VARCHAR PRIMARY KEY, "author" VARCHAR, "year" INTEGER, "accountId" VARCHAR ); INSERT INTO "book" values ('dummy', 'dummy', 666, ...
/* Duplicate Emails Runtime: 194 ms */ select email from Person group by Email having count(*) > 1
CREATE DATABASE Bamazon; USE Bamazon; CREATE TABLE products( item_id INT NOT NULL AUTO_INCREMENT, product_name VARCHAR(100) NULL, department_name VARCHAR(50) NULL, price DECIMAL(10,2) NULL, stock_quantity INT(7), PRIMARY KEY (item_id) );
ALTER TABLE produto ADD COLUMN imagem_bytes BLOB AFTER imagem;
create or replace function GetResolveData(Unstation_no string) return DATE is Result DATE; ReturnStr DATE; SelectCount number; begin Result :=null; ReturnStr :=null; SelectCount:=0; select count(*) into SelectCount from c_tco_pro_cell_tmp where project_id=Unstation_no and project_id!='нч' and rownum=1;...
-- customers -- -- Customers are the customers of large circuits that are monitored by -- GeoNet. CREATE TABLE customers ( id NUMBER NOT NULL PRIMARY KEY, -- Primary Key comes from customer_id_seq name VARCHAR2(40) NOT NULL, -- Customer Name short_name VARCHAR2(10) NOT NULL, -- Customer Short Name - Used...
CREATE DATABASE IF NOT EXISTS `film_test` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `film_test`; -- MySQL dump 10.13 Distrib 5.7.14, for Win64 (x86_64) -- -- Host: localhost Database: film -- ------------------------------------------------------ -- Server version 5.7.14-log /*!40101 SET @OLD_CHARACTER_...
UPDATE Store_Information SET Sales = 500 WHERE Store_Name = 'Los Angeles'
DROP DATABASE IF EXISTS `police`; CREATE DATABASE `police`; USE `police`; DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `UserID` INT(10) NOT NULL AUTO_INCREMENT, `fname` VARCHAR(40) NOT NULL, `lname` VARCHAR(40) NOT NULL, `email` VARCHAR(40) NOT NULL UNIQUE, `...
INSERT INTO car VALUES (5,'Pegassi','Carbon Black','V12','bky-707','Zentorno',285), (6,'Elegy','Blue','V8','lkj-984','RH8',210), (7,'Dewbauchee','Yellow','V8','dkl-128','Massacro',225), (8,'Benefactor','Green','V6','las-753','Stirling GT',180), (9,'Benefactor','Red','V6','sdf-654','Panto',120);
CREATE TABLE inventory ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(100) NOT NULL, price DECIMAL(13,2) NOT NULL, quantity INT NOT NULL, theimg TEXT NOT NULL ); CREATE TABLE orderlist ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, full_name VARCHAR(100) NOT NULL, country VAR...
/* Write an SQL query to report all the employees with their primary department. For employees who belong to one department, report their only department. Employee table: +-------------+---------------+--------------+ | employee_id | department_id | primary_flag | +-------------+---------------+--------------+ | 1 ...
DROP USER IF EXISTS 'fmp_user'@'localhost'; CREATE USER 'fmp_user'@'localhost' IDENTIFIED BY '123456'; GRANT INSERT,SELECT,UPDATE,DELETE ON fmp_db.categoria TO 'fmp_user'@'localhost'; GRANT INSERT,SELECT,UPDATE,DELETE ON fmp_db.compra TO 'fmp_user'@'localhost'; GRANT INSERT,SELECT,UPDATE,DELETE ON fmp_db.loja TO 'fmp_u...
USE join_ex; SELECT symptoms_family, COUNT(*) FROM patient WHERE patient.disease = 'cabbage disease' GROUP BY symptoms_family ORDER BY symptoms_family
CREATE TABLE users ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL ); CREATE TABLE tickets ( id SERIAL PRIMARY KEY, creator_id INTEGER REFERENCES users (id) NOT NULL, subject TEXT NOT NULL, created_at TIMESTAMP WITH TIME ZONE NOT NULL ); CREATE TA...
# --- !Ups ALTER TABLE auth_net_account ADD is_enabled tinyint(1) default 0; # --- !Downs ALTER TABLE auth_net_account DROP COLUMN is_enabled;
-- Please note that the mysql_scripts folder and its contents are not part of the reference implementation. The sql script files contained in the mysql_scripts folder are means for creating the snippetbox DB (some scripts are still missing, but I intend to add them later once the project is finished). This also explain...
-- Sep 10, 2009 10:20:38 PM EEST UPDATE AD_Column SET AD_Val_Rule_ID=163,Updated=TO_DATE('2009-09-10 22:20:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=57957 ;
/* MS SQL Server*/ /* Write your T-SQL query statement below */ with a as( select id,salary,rank() over (order by salary desc) as ran from employee ) select max(salary) as SecondHighestSalary from a where a.ran=2; /* max returns null if value not found*/ /* Success Details Runtime: 1718 ms, faster than 5.88% of ...
-- Dec 12, 2009 3:21:34 PM CET -- BF [2913291= Fixed Assets Application Dictionary stabilization -- https://sourceforge.net/tracker/index.php?func=detail&aid=2913291&group_id=176962&atid=879332 UPDATE AD_Window SET WindowType='M',Updated=TO_TIMESTAMP('2009-12-12 15:21:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE...
select id as pay, orderid as order_id, paymentmethod as payment_method, status, -- amount from cents to dollars amount/100 as amount, created as created_at from {{ source ('stripe', 'payment') }}
CREATE TABLE smss ( id uuid PRIMARY KEY, tel VARCHAR NOT NULL, code VARCHAR NOT NULL, created_at timestamp NOT NULL );
#contaggio utenti totali select count(*) from Users u; #conteggio utenti per categorie select count(distinct u.id) from Users u where (u.reputation<10); select count(distinct u.id) from Users u where (u.reputation>9 and u.reputation<1000); select count(distinct u.id) from Users u where (u.reputation>999 and u.reputati...
CREATE TABLE [BaseData].[Customer] ( [Id] BIGINT IDENTITY (1, 1) NOT NULL, [Number] NVARCHAR (10) NOT NULL, [Label] NVARCHAR (50) NOT NULL, CONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED ([Id] ASC) );
--1\ initial sql --2\ import DU about security \log \common\ui\ --3\ create cdpSYS user --4\ active cdpSYS role create user CDPSYS password Sap12345; ALTER USER CDPSYS DISABLE PASSWORD LIFETIME; call "_SYS_REPO"."GRANT_ACTIVATED_ROLE"('cdp.security.roles::sysAdmin','CDPSYS'); --5\ create cdpLOG user --6\ active cdpL...
insert into p2_gps values('판교', '경기도 성남시 분당구 삼평동 682 유스페이스2 B동 8층', 'Pyeon2 판교점' ,'010-6666-8345'); insert into p2_gps values('정자', '경기도 성남시 분당구 정자동 166-1 101호', 'Pyeon2 정자점' , '010-5581-0156'); insert into p2_gps values('야탑', '경기 성남시 분당구 야탑동 355-4 한주코아제상가동', 'Pyeon2 야탑점' , '010-3131-7995');
DROP SCHEMA IF EXISTS dbs1; CREATE SCHEMA IF NOT EXISTS dbs1;
create or replace procedure CheckTwoWay as begin EXECUTE IMMEDIATE 'CREATE global temporary TABLE Temp_TwoWay ( M_INT_ID int, M_NAME varchar(200), M_PCI int, N_INT_ID int, N_NAME varchar(200), N_PCI_MOD int ) on commit preserve rows'; declare --À...
CREATE TABLE `journeys`( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增id', `uid` VARCHAR(128) NOT NULL DEFAULT '' COMMENT '创建人id', `spot_id` BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT '景点id', `relation` TINYINT UNSIGNED NOT NULL DEFAULT 1 COMMENT '关系', `status` TINYINT UNSIGNED NOT NULL DEFAUL...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 23, 2021 at 01:14 PM -- Server version: 10.4.18-MariaDB -- PHP Version: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...