sql stringlengths 6 1.05M |
|---|
<reponame>JqhSdtz/laputa_sns<filename>sql/laputa_lpt_post.sql
-- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: **.***.***.*** Database: laputa
-- ------------------------------------------------------
-- Server version 8.0.20
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40... |
insert into users (first_name, last_name, password, email) values ('TestUser','1407','NU41SX54!','<EMAIL>');
insert into users (first_name, last_name, password, email) values ('TestUser','1045','PY51GZ88!','<EMAIL>');
insert into users (first_name, last_name, password, email) values ('TestUser','1056','GR87DD63!','<EM... |
/*
author: <NAME> <EMAIL>, <EMAIL>
1.0 release date: 2015-09-16
1.1 release date: 2016-04-19
1.2 release date: 2020-01-18 <NAME> (<EMAIL>): added support for APEX 20.2 "EXPRESSION" type of conditions and validations
*/
-- DECLARE
e_validation_failed EXCEPTION;
TYPE t_tab IS TABLE OF VARCHAR2(4000) INDE... |
INSERT INTO `ads_geo` (`id`, `canonical_name`, `cname`) VALUES
(2004, 'Afghanistan', '阿富汗'),
(2008, 'Albania', '阿尔巴尼亚'),
(2010, 'Antarctica', '南极洲'),
(2012, 'Algeria', '阿尔及利亚'),
(2016, 'American Samoa', '美属萨摩亚'),
(2020, 'Andorra', '安道尔'),
(2024, 'Angola', '安哥拉'),
(2028, 'Antigua and Barbuda', '安提瓜和巴布达'),
(2031, 'Azerba... |
use SQLServerCDCSync;
-- DROP Table
IF OBJECT_ID('dbo.Test1Copy', 'U') IS NOT NULL DROP TABLE [dbo].[Test1Copy];
-- Copy table structure
SELECT * INTO [dbo].[Test1Copy] FROM [dbo].[Test1] WHERE 1 = 2;
BEGIN TRAN
-- http://www.mattmasson.com/2012/01/processing-modes-for-the-cdc-source/
SET IDENTITY_INSERT [dbo].[Te... |
drop database if exists kijiji;
drop role if exists descrive;
create database kijiji;
create role descrive with password '<PASSWORD>';
grant all privileges on database kijiji to descrive;
ALTER ROLE descrive WITH LOGIN;
|
<gh_stars>100-1000
ALTER TABLE "public"."cards" ADD COLUMN "is_allowed" boolean NULL;
|
-- collate2.test
--
-- execsql {
-- SELECT a FROM collate2t1 WHERE a >= 'aa' ORDER BY 1;
-- }
SELECT a FROM collate2t1 WHERE a >= 'aa' ORDER BY 1; |
<reponame>annapowellsmith/openpresc
SELECT
month,
FORMAT("%.2f", ROUND(SUM(actual_cost), 2)) AS actual_cost,
SUM(items) AS items,
SUM(quantity) AS quantity
FROM
`{hscic}.normalised_prescribing`
WHERE
(bnf_code='0403030E0AAAAAA')
AND pct='10Q'
AND {{ date_condition }}
GROUP BY
month
ORDER BY
month AS... |
<gh_stars>1-10
select c1.concept_id as concept_id,
c2.concept_name as category,
ard1.min_value as min_value,
ard1.p10_value as P10_value,
ard1.p25_value as P25_value,
ard1.median_value as median_value,
ard1.p75_value as P75_value,
ard1.p90_value as P90_value,
ard1.max_value as max_value
from @results_database_s... |
<reponame>aravi5/drill-test-framework<filename>framework/resources/Datasources/hive_storage/tpch100/tpch_text.ddl
create database if not exists tpch100_text;
create external table if not exists tpch100_text.nation (
n_nationkey int,
n_name string,
n_regionkey int,
n_comment string
)
ROW FORMAT delimited... |
<reponame>oxanamenushina/job4j
create table if not exists vacancies_java (
id serial primary key not null,
name varchar(300),
text varchar(8000),
link varchar(300),
creation_time int8,
CONSTRAINT name_unique UNIQUE (name)
); |
#磁盘管理命令
INSERT INTO DISK_MANAGE (questions, answers)
VALUES ('查看磁盘空间的使用情况', 'df [-h]'),
('显示指定的目录或文件所占用的磁盘空间', 'du [-h] [targetDir]'),
('切换到d盘', 'cd /d'),
('显示工作目录的绝对路径名称', 'pwd'),
('查看目录下的详细信息', 'ls [-althi] [targetDir]')
# (''),
# (''),
# (''),
# (''),
# ... |
<reponame>SAP-samples/hana-apl-apis-runtimes
-- ================================================================
-- APL_AREA, PROFILE_DATA_AND_GET_ASSOCIATIONRULES_AND_GET_ASSOCIATIONRULES
--
-- Assumption 1: the users & privileges have been created & granted (see apl_admin_ex.sql).
-- ------------------------------... |
ALTER TABLE repo ADD COLUMN deleted_at TIMESTAMP WITH TIME ZONE;
|
SELECT tab0.v1 AS v1 , tab6.v7 AS v7 , tab4.v5 AS v5 , tab5.v6 AS v6 , tab3.v4 AS v4 , tab8.v9 AS v9 , tab2.v3 AS v3 , tab7.v8 AS v8 , tab1.v2 AS v2 , tab9.v10 AS v10
FROM (SELECT obj AS v1
FROM wsdbm__friendOf$$1$$
WHERE sub = 'wsdbm:User53037'
) tab0
JOIN (SELECT sub AS v1 , obj AS v2
FROM wsdbm_... |
<gh_stars>1000+
-- +migrate Up
UPDATE notification_channels SET meta = '{}' WHERE meta isnull;
ALTER TABLE notification_channels
ALTER COLUMN meta SET DEFAULT '{}',
ALTER COLUMN meta SET NOT NULL;
-- +migrate Down
ALTER TABLE notification_channels
ALTER COLUMN meta DROP NOT NULL,
ALTER COLUMN meta DR... |
-- This CLP file was created using DB2LOOK Version 7.2
-- Timestamp: Sun Jul 21 21:48:30 EDT 2002
-- Database Name: MDSETUP
-- Database Manager Version: DB2/6000 Version 7.2.3
-- Database Codepage: 819
CONNECT TO MDSETUP;
------------------------------------------------
-- DDL Statements for table ... |
SET NAMES UTF8;
DROP TABLE IF EXISTS `application_logs`;
CREATE TABLE `application_logs` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`timestamp` datetime NOT NULL,
`message` varchar(1024) DEFAULT NULL,
`priority` int(10) DEFAULT NULL,
`fileobject` varchar(1024) DEFAULT NULL,
`info` varchar(1024) DEFAULT NU... |
<gh_stars>0
SELECT * FROM shoelace;
sl_name | sl_avail | sl_color | sl_len | sl_unit | sl_len_cm
---------+----------+----------+--------+---------+-----------
sl1 | 5 | black | 80 | cm | 80
sl2 | 6 | black | 100 | cm | 100
sl7 | 6 | brown | ... |
<filename>system.sql
-- execute_ conn "drop table if exists transactions"
-- execute_ conn "create table transactions (\
-- \ seq serial, \
-- \ txid varchar(64) not null unique, \
-- \ app varchar(64) not null, \
-- ... |
drop table member_stastic;
drop table company_stastic;
create table company_stastic(
total_profit number,
total_income number,
total_expense number,
total_date varchar2(10)
);
create table member_stastic(
userid varchar2(25) primary key REFERENCES member(id) on delete set null,
total_pay number,
total_point nu... |
\! echo Users
SELECT * FROM Users;
\! echo -------
\! echo Quizzes
SELECT * FROM Quizzes;
\! echo -------
\! echo Questions
SELECT * FROM Questions;
\! echo -------
\! echo Answers
SELECT * FROM Answers;
\! echo -------
\! echo QuizResults
SELECT * FROM QuizResults;
\! echo -------
\! echo Programs
SELECT * FROM Progra... |
<reponame>pacoweb/EntityFrameworkCore.Generator
-- Table [dbo].[Priority] data
MERGE INTO [dbo].[Priority] AS t
USING
(
VALUES
(1, 'High', 'High Priority', 1, 1),
(2, 'Normal', 'Normal Priority', 2, 1),
(3, 'Low', 'Low Priority', 3, 1)
)
AS s
([Id], [Name], [Description], [DisplayOrder], [IsActive... |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SE... |
set search_path to tcs_catalog;
create view calendar
as select * from common_oltp.calendar;
create view company
as select * from common_oltp.company;
create view contact
as select * from common_oltp.contact;
create view email
as select * from common_oltp.email;
create view event
as select * from common_oltp.event;... |
-- 01. Find names of all employees by first name
SELECT FirstName, LastName
FROM Employees
WHERE LEFT(FirstName, 2) = 'sa'
-- 02. Find names of all employees by last name
SELECT FirstName, LastName
FROM Employees
WHERE LastName LIKE '%ei%' ESCAPE '!'
-- 03. Find first names of all employees
SELECT FirstName
FROM Em... |
INSERT INTO eg_module(id, name, enabled, contextroot, parentmodule, displayname, ordernumber) VALUES
(nextval('seq_eg_module'), 'transactions', true, null, (select id from eg_module where name = 'Council Management'), 'Transactions', 2);
INSERT INTO eg_action(id, name, url, queryparams, parentmodule, ordernumber, dis... |
<reponame>IChowdhury01/NutriDiary-Adaptive-TDEE-Tracker
--This PostgreSQL script will run when the Spring Boot app is initialized. It adds test entries to the database.
--Empty all tables at startup. Disable for DEPLOYMENT.
TRUNCATE users CASCADE;
TRUNCATE logs CASCADE;
TRUNCATE users_logs CASCADE;
--Add tes... |
<reponame>metatooth/cannabis
begin;
insert into manufacturers (manufacturer) values ('mockmeter'), ('mockplug');
commit;
|
-- AlterTable
ALTER TABLE "User" ALTER COLUMN "phone" DROP NOT NULL;
|
-- v1.2.0
INSERT INTO `lylme_tags` (`tag_id`, `tag_name`, `tag_link`, `tag_target`) VALUES (NULL, '关于本站', '/about', '1'); |
select last_name,count(emp_no) as Count from employees
group by last_name
order by Count desc; |
<filename>db/scripts.sql
-- Cliente
-- Ver historial de Viaje del cliente x
Select *
FROM Viaje
WHERE Id_cliente = 4;
-- Filtrar historial de Viaje por fecha x del cliente y
SELECT *
FROM Viaje
WHERE fecha = x AND id_cliente = y;
-- Filtrar historial de Viaje por rango de fecha x, y del cliente z
SELECT *
FROM Viaj... |
CREATE TABLE student (
id int(11) unsigned NOT NULL AUTO_INCREMENT,
first_name varchar(255) DEFAULT NULL,
last_name varchar(255) DEFAULT NULL,
nim int(11) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
<filename>migrations/committed/000008-allow-details-value-null.sql<gh_stars>0
--! Previous: sha1:e0b31f13d939aa397e1f3af06063d822c41119d7
--! Hash: sha1:77b2c2fb43f597d94dbb3791bcd6ec7d5589aa80
--! Message: allow-details-value-null
-- Allow nulls in detail.values
ALTER TABLE details ALTER COLUMN value DROP NOT NULL;
|
ALTER TABLE tmassociation ADD Imported INTEGER;
ALTER TABLE tmtopic ADD Imported INTEGER;
ALTER TABLE tmmaps ADD Url VARCHAR(255);
|
<gh_stars>1-10
/* *******************************************************************************************************
Copyright (C) 2019-Present Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under the terms of the under the Apache
License, Version 2.0 (th... |
<filename>pgAdmin/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/default/msql_alter_fts_conf_add_comment.sql
COMMENT ON TEXT SEARCH CONFIGURATION test.test_fts_configuration_def1
IS 'test comment';
|
<gh_stars>100-1000
--
--FOR BLACKLIST FEATURE: WITH OIDS、INHERITS、CREATE TYPE/DOMAIN/AGGREGATE/OPERATOR/SEQUENCES is not supported.
--
--
-- Test access privileges
--
-- Clean up in case a prior regression run failed
-- Suppress NOTICE messages when users/groups don't exist
SET client_min_messages TO 'warning';
DRO... |
<reponame>Alessa1996/circuteach
-- MySQL dump 10.13 Distrib 5.7.17, for osx10.12 (x86_64)
--
-- Host: localhost Database: videos
-- ------------------------------------------------------
-- Server version 5.7.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESUL... |
/*
1. Notes from Underground - By <NAME>
2. Crime and Punishment - By <NAME>
3. The Idiot - By <NAME>
4. Demons - By <NAME>
5. The Brothers Karamazov - By <NAME>
6. Nineteen Eighty-four - By <NAME>
7. <NAME> - By <NAME>
8. War and Peace - By <NAME>
*/
|
DROP DATABASE IF EXISTS employee_db;
CREATE DATABASE employee_db;
USE employee_db;
CREATE TABLE departments (
id INTEGER NOT NULL AUTO_INCREMENT,
dept_name VARCHAR(30),
PRIMARY KEY (id)
);
CREATE TABLE roles (
id INTEGER NOT NULL AUTO_INCREMENT,
title VARCHAR(30),
salary DECIMAL (10,2),
d... |
/*
Navicat Premium Data Transfer
Source Server : 172.16.58.3
Source Server Type : MySQL
Source Server Version : 80023
Source Host : 172.16.58.3:3306
Source Schema : xyz.acproject.blogs
Target Server Type : MySQL
Target Server Version : 80023
File Encoding : 65001
Dat... |
-- noinspection SqlNoDataSourceInspectionForFile
USE [demo]
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[pocket].[pocket_sku_price]') AND type in (N'U'))
DROP TABLE [pocket].[pocket_sku_price]
GO
CREATE TABLE [pocket].[pocket_sku_price]
(
[id] INTEGER IDENTITY(1,1) NOT... |
CREATE DATABASE arduin_bd;
USE arduin_bd;
DROP TABLE IF EXISTS tipo_riego;
CREATE TABLE tipo_riego(
tipo_id INT NOT NULL,
tipo_descripcion VARCHAR(150),
eliminar_estado BOOLEAN DEFAULT FALSE,
PRIMARY KEY (tipo_id)
);
DROP TABLE IF EXISTS usuario;
CREATE TABLE usuario(
usuario_rut VARCHAR(12),
usuario_nomb... |
<reponame>septrisando/sisjamtu<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 30, 2020 at 07:07 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET... |
Drop database if exists techblog_db;
Create database techblog_db; |
<filename>db/v 1.2/koka_mart.sql
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 21 Jan 2021 pada 16.30
-- Versi server: 10.4.8-MariaDB
-- Versi PHP: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+... |
<reponame>ministryofjustice/court-registry
INSERT INTO COURT_TYPE(ID, DESCRIPTION) VALUES ('CMT', 'Court Martial');
INSERT INTO COURT_TYPE(ID, DESCRIPTION) VALUES ('COA', 'Court of Appeal');
INSERT INTO COURT_TYPE(ID, DESCRIPTION) VALUES ('COU', 'County Court/County Divorce Ct');
INSERT INTO COURT_TYPE(ID, DESCRIPTION)... |
-- phpMyAdmin SQL Dump
-- version 3.3.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 11, 2012 at 01:40 PM
-- Server version: 5.1.54
-- PHP Version: 5.3.5-1ubuntu7.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET ... |
<reponame>KartikKannapur/Data_Structures_and_Algorithms_Python<gh_stars>1-10
/*
Query the sum of the populations for all Japanese cities in CITY. The COUNTRYCODE for Japan is JPN.
*/
SELECT SUM(POPULATION) FROM CITY
WHERE COUNTRYCODE = "JPN"; |
<reponame>opengear/device-checkout-rs
-- This file should undo anything in `up.sql`
create temporary table devices_backup(id, device_name, device_url, device_owner, comments, reservation_status, created_at, updated_at);
insert into devices_backup select id, device_name, device_url, device_owner, comments, reservation_... |
<gh_stars>1-10
/* 把1号课程的非空成绩提高10% */
update sc set sc.grade = grade * 1.1
where cno = '1'
and grade != '0';
|
use ducs;
drop table if exists departments, locations, students, projects, works_in;
create table departments
(
id int not null auto_increment,
name varchar(255) not null,
primary key (id)
);
create table locations
(
id int not null auto_increment,
location varchar(255) ... |
<reponame>pntone/apex-flowsforapex
create or replace view flow_p0010_vw
as
select dgrm_content
, prcs_id
, all_completed
, last_completed
, all_errors
, all_current
from flow_instance_details_vw
with read only;
|
--DROP TABLE log_events PURGE;
CREATE TABLE log_events (
log_id INTEGER CONSTRAINT nn_log_events_log_id NOT NULL,
log_parent INTEGER,
--
app_id NUMBER(4) CONSTRAINT nn_log_events_app_id NOT NULL,
page_id NUMBER(6) CONST... |
<filename>apps/server/prisma/migrations/20210828051939_add_replies/migration.sql<gh_stars>1-10
/*
Warnings:
- You are about to drop the column `body` on the `Comment` table. All the data in the column will be lost.
- Added the required column `commentText` to the `Comment` table without a default value. This is ... |
<filename>backend/de.metas.swat/de.metas.swat.base/src/main/sql/postgresql/ddl/functions/delete_not_needed_translations.sql
DROP FUNCTION IF EXISTS delete_not_needed_translations(
p_DryRun boolean
)
;
CREATE OR REPLACE FUNCTION delete_not_needed_translations(
p_DryRun boolean = TRUE
)
RETURNS void
LANG... |
<reponame>dram/metasfresh<gh_stars>1000+
update ad_ref_list set value='0', valuename='0' where ad_ref_list_id = 541431;
update ad_ref_list set value='0', valuename='0' where ad_ref_list_id = 541419;
update ad_ref_list set value='0', valuename='0' where ad_ref_list_id = 541494;
update ad_ref_list set value='0', valuenam... |
create or replace function update_pmodelset (integer)
returns integer
language plpgsql
as '
DECLARE
v_pmodelset_id alias for $1;
v_row record;
v_pg_row record;
v_cmd text;
v_tmptblname text;
v_nrows_del integer := 0;
v_nrows_ins integer := 0;
v_nrows_tot integer := 0;
BEGIN
-- *******************************... |
create database SampleDB;
use SampleDB;
CREATE TABLE `users` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(45) NOT NULL,
`password` varchar(45) NOT NULL,
`fullname` varchar(45) NOT NULL,
`email` varchar(45) NOT NULL,
PRIMARY KEY (`user_id`)
); |
<gh_stars>0
WITH wscs AS
(
SELECT dd.d_day_name, dd.d_week_seq, SUM(ws_sold_date_sk) sold_date_sk, SUM(ws_ext_sales_price) sales_price
FROM web_sales AS ws
JOIN date_dim AS dd ON dd.d_date_sk = ws.ws_sold_date_sk
GROUP BY d_day_name, d_week_seq
UNION ALL
SELECT dd.d_day_name... |
<reponame>christoofar/FogLAMP<filename>scripts/plugins/storage/sqlite/init.sql
----------------------------------------------------------------------
-- Copyright (c) 2018 OSIsoft, LLC
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the Licens... |
---Funciones definidas por el usuario
--Funciones Escalares
--Funciones con valores de tabla en linea
--Funciones con valores de tabla y multiples instruciones
--Funciones Escalares
---Reciben parametro de entrada, procesar y retornar 1 valor con un tipo de datos
use musicallyapp
go
Create function EdadPersona (@F... |
<gh_stars>1-10
/* Q4 Find names and grades of students who only have friends in the same grade.
Return the result sorted by grade, then by name within each grade. */
select distinct highschooler.name, highschooler.grade
from friend, highschooler, highschooler as h2
where friend.id1 = highschooler.id and friend.... |
<filename>src/main/resources/dbmigrate/mysql/msg/V0_0_1__msg_info.sql
-------------------------------------------------------------------------------
-- msg info
-------------------------------------------------------------------------------
CREATE TABLE MSG_INFO(
ID BIGINT auto_increment,
NAME VARCH... |
CREATE TABLE configuration (
id integer PRIMARY KEY,
locale character varying(2),
name character varying(255),
type character varying(20),
value character varying(255)
);
CREATE TABLE answer (
id integer PRIMARY KEY,
create_date timestamp without time zone,
locale character varying(2),
... |
drop function if exists dbo.[_jannesen_dbtools_sql_module_definition]
go
create function dbo.[_jannesen_dbtools_sql_module_definition]
(
@object_id int,
@type nvarchar(32),
@schema nvarchar(128),
@name nvarchar(128)
)
returns nvarchar(max)
as
begin
declare @definiti... |
select c1,c2,c3 from table1 where c1 in (select c4 from table2); |
<gh_stars>10-100
-- Add unicast id to domain_router
ALTER TABLE domain_router
ADD COLUMN `router_unicast_id` INT(1) DEFAULT NULL COMMENT 'Unicast ID of this router: 1 or 2 or NULL when multicast';
-- Add vrrp fields to vpc
ALTER TABLE vpc
ADD COLUMN `advert_interval` INT(1) DEFAULT 1 COMMENT 'VRRP advertisement in... |
ALTER TABLE DATICAL_ADMIN.authors ADD numericColumn NUMBER
ALTER TABLE DATICAL_ADMIN.authors MODIFY numericColumn DEFAULT 100000000 |
DROP TABLE IF EXISTS `tuo_admin`
;--www.lfmnet.com--
CREATE TABLE `tuo_admin` (
`admin_id` int(11) NOT NULL AUTO_INCREMENT,
`admin_code` varchar(50) DEFAULT NULL COMMENT '管理员编号',
`admin_acc` varchar(100) DEFAULT NULL COMMENT '管理员账号',
`admin_pwd` varchar(100) DEFAULT NULL COMMENT '<PASSWORD>',
`admin_name` ... |
-- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2019-04-10 11:50:04
-- 服务器版本: 5.5.53
-- PHP Version: 5.6.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET ... |
######2018-12-6 dxylonline 添加服务器开关时间
ALTER TABLE data_game_list_info add last_close_time int(11) DEFAULT 0 NOT NULL COMMENT '最后关闭服务器时间' AFTER game_version_id;
ALTER TABLE data_game_list_info add last_open_time int(11) DEFAULT 0 NOT NULL COMMENT '最后关闭服务器时间' AFTER last_close_time;
ALTER TABLE fivepk_seo_att2 add op... |
<filename>src/main/resources/db/migration/common/V1_2__CREATE_TABLE_groups.sql<gh_stars>0
-- noinspection SqlNoDataSourceInspectionForFile
CREATE TABLE IF NOT EXISTS units
(
id BIGSERIAL PRIMARY KEY,
display_name TEXT NOT NULL,
reference_name TEXT NOT NULL,
... |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 27, 2021 at 12:43 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<reponame>lingling1420q/UDLA<filename>java/sbp-start/build/resources/main/db/mysql/0-schema.sql
CREATE
database wsat DEFAULT CHARACTER
SET
utf8mb4 COLLATE utf8mb4_unicode_ci;
use wsat;
-- MySQL dump 10.13 Distrib 5.7.23, for osx10.14 (x86_64)
--
-- Host: 172.16.17.32 Database: cscan
-- ----------------... |
<reponame>dude123r24/migration1
######################## User 1: amit1
CREATE USER amit1 IDENTIFIED BY amit1;
GRANT dba TO amit1;
DROP TABLE amit1.tab_cols_withspace;
DROP TABLE amit1.sales;
DROP TABLE amit1.item_detail;
DROP TABLE amit1.item;
CREATE TABLE amit1.tab_cols_withspace (
col1 ... |
<reponame>qvant/yet_another_oracle_doc_gen<filename>sample_db/users/_all.sql
-- Create the user
create user &&UNAME
default tablespace &&TBSP
temporary tablespace &DEF_TBSP
quota unlimited on &&TBSP;
alter user &&UNAME identified by &PWD;
-- Grant/Revoke object privileges
grant execute on DBMS_LOCK to &&UNAME;
... |
<filename>DB/crm.sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 06, 2021 at 06:35 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
CREATE TABLE [dbo].[ObjectTypes] (
[ObjectType] VARCHAR (2) NOT NULL,
[ObjectTypeName] VARCHAR (40) NULL,
[LastUpdateDate] DATETIME NULL
);
GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Object Type: The list of object types that identify objects as assets, liabilities, ... |
ALTER TABLE oskari_maplayer_group
ADD COLUMN order_number integer DEFAULT null;
ALTER TABLE oskari_maplayer_group_link
ADD COLUMN order_number integer DEFAULT null; |
CREATE TABLE tweets
(
id varchar NOT NULL PRIMARY KEY,
text varchar NOT NULL,
author_id varchar NOT NULL,
conversation_id varchar,
created_at timestamp NOT NULL,
query varchar NOT NULL,
likes int NOT NULL,
replies int NOT NULL,
... |
<reponame>LingCalvin/basic-flashcards-server
DROP TABLE IF EXISTS profiles;
DROP TABLE IF EXISTS revoked_tokens;
DROP TABLE IF EXISTS decks;
DROP TYPE IF EXISTS card;
DROP TYPE IF EXISTS deck_visibility;
DROP TRIGGER IF EXISTS on_auth_user_created ON auth.users;
DROP TRIGGER IF EXISTS update_timestamp ON decks;
DROP... |
-- Assert that trello_members contains all members from the snapshot
select
distinct(id_member)
from {{ ref('trello_members') }}
where id_member not in (select id_member
from {{ ref('trello_members_snapshot') }})
|
<reponame>lgcarrier/AFW
SET DEFINE OFF;
ALTER TABLE AFW_07_AUDIT_STRUC_APLIC ADD (
CONSTRAINT AFW_07_AUDIT_STRUC_APLIC_PK
PRIMARY KEY
(SEQNC)
ENABLE VALIDATE)
/
|
SELECT CONCAT_WS(' ', `nom`, `prenom`, CAST(`date_naissance` AS DATE)) AS 'date de naissance'
FROM `db_mwelsch`.`fiche_personne`
WHERE YEAR(`date_naissance`) = '1989'
ORDER BY `nom` ASC
|
DO $$
DECLARE version_num integer;
BEGIN
SELECT current_setting('server_version_num') INTO STRICT version_num;
IF version_num > 90600 THEN
EXECUTE $E$ ALTER FUNCTION currency_in(cstring) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION currency_out(currency) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION currency_r... |
<filename>src/main/resources/sql/init.sql
-- Core Blockchain Tables
CREATE TABLE blockchain_segments (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
parent_blockchain_segment_id INT UNSIGNED,
nested_set_left INT UNSIGNED,
nested_set_right INT UNSIGNED,
PRIMARY KEY (id),
FOREIGN KEY blockchain_segmen... |
<filename>test_append/orders/update_16.sql<gh_stars>1-10
INSERT INTO public.orders VALUES (4568227, 52282, 'O', 135529.17, '1996-02-11', '5-LOW ', 'Clerk#000000932', 0, 'oss the carefully regular foxes. slyly express foxes cajole carefull');
INSERT INTO public.orders VALUES (2996068, 100216, 'F', 236289.97, '1... |
<filename>lesson8between/lesson8code.sql
use mydbase
go
select Name, title, [money earned] from Table_1
where [money earned] between 170000 and 260000
order by [money earned] desc
--1. pick out the people who earn between 170,000 and
--2. 260,000 and sort the results by the money earned
--3. logical execution order
--... |
<filename>src/test/resources/sql/select/eeedb0ec.sql<gh_stars>10-100
-- file:json.sql ln:220 expect:true
SELECT test_json ->> 'field6' FROM test_json WHERE json_type = 'object'
|
--find all subcategories has the number of product > 100
select sc.ID [SubCategoryID], sc.SubCategoryName, count(p.ID) [NumberOfProducts] from
SubCategory sc join Product p
on sc.ID = p.SubCategoryID
group by sc.ID, sc.SubCategoryName
having count(p.ID) > 100
order by count(p.ID) desc |
create or replace function pgq_node.register_location(
in i_queue_name text,
in i_node_name text,
in i_node_location text,
in i_dead boolean,
out ret_code int4,
out ret_note text)
returns record as $$
-- ----------------------------------------------------------------------
-- Function: pgq_nod... |
-- 2020-03-19T15:49:52.096Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET DisplayLogic='@R_RequestType_InternalName/-1@ =''A_CustomerComplaint'' | @R_RequestType_InternalName/-1@ = ''B_VendorComplaint'' | @R_RequestType_InternalName/-1@ = ''C_ConsumerComplaint'' | @M_InOut_ID@ ! ... |
<gh_stars>0
create or replace view OSP$BUDGET as
select PROPOSAL_NUMBER,VERSION_NUMBER,START_DATE,END_DATE,TOTAL_COST,TOTAL_DIRECT_COST,
TOTAL_INDIRECT_COST,COST_SHARING_AMOUNT,UNDERRECOVERY_AMOUNT,RESIDUAL_FUNDS,TOTAL_COST_LIMIT,
OH_RATE_CLASS_CODE,OH_RATE_TYPE_CODE,COMMENTS,FINAL_VERSION_FLAG,UPDATE_TIMESTAMP,
U... |
{{ config(enabled=var('using_schedules', True)) }}
-- AGENT WORK TIME
-- This is complicated, as SLAs minutes are only counted while the ticket is in 'new' or 'open' status.
-- Additionally, for business hours, only 'new' or 'open' status hours are counted if they are also during business hours
with agent_work_time_f... |
<filename>mobileAppStudy-ResponseServer/resources/schemas/dbscripts/postgresql/obsolete/mobileappstudy-16.30-16.31.sql
/*
* Copyright (c) 2017-2019 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obt... |
<reponame>MatBarba/ensembl-production
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
-- Copyright [2016-2019] EMBL-European Bioinformatics Institute
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.